简体   繁体   中英

Get link from Web Browser WP8 C#

Please tell me, how can I get URL from web browser . Thanks

private void ApplicationBarIconButton_Click_2(object sender, EventArgs e)
{
    WebBrowserTask webBrowserTask = new WebBrowserTask();
    webBrowserTask.Uri = new Uri("...", UriKind.Absolute);
    webBrowserTask.Show();
    DispatcherTimer newTimer = new DispatcherTimer();
    newTimer.Interval = TimeSpan.FromSeconds(1);
    newTimer.Tick += OnTimerTick;
    newTimer.Start();   
}

void OnTimerTick(Object sender, EventArgs args)
{
   // HERE I WANT TO GET URL FROM WEB BROWSER 
}

This is not possible with a WebBrowserTask . It is possible with a WebBrowser component embeded in your app, where you can handle the OnNavigating event and store the actual url with each user interaction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM