Answer the question
In order to leave comments, you need to log in
WebView, C#, Windows. How to find out the download is complete and get the final address?
There is a Windows Phone project on it there is a WebView component. By pressing the button, it jumps to a specific resource. There is a need to find out that:
1) The download is complete, that is, all redirects, etc. have ended.
2) Get the end address.
Tried to take after the end (just at the very end) from WebView.Source but the one that was specified for Navigate is stored there.
I tried to google, but apparently I need to poke my nose, I couldn’t find it myself.
For example: vk.cc/snBwO in WebView loaded as it should be google but in Source vk.cc/snBwO , and I would like to see https://google.com
Answer the question
In order to leave comments, you need to log in
LoadCompleted seems to have been removed, subscribe to NavigationCompleted. It?
private void webView1_NavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args)
{
if (args.IsSuccess == true)
{
statusTextBlock.Text = "Navigation to " + args.Uri.ToString() + " completed successfully.";
}
else
{
statusTextBlock.Text = "Navigation to: " + args.Uri.ToString() +
" failed with error " + args.WebErrorStatus.ToString();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question