I want to create a C# webview and automatically receive the URL as a string whenever the web page changes in the webview.
What should I do? ㅠ<
c#
In webview, WebView.LoadCompleted event occurs.
Implement LoadCompletedEventHandler delegate to handle the event.
This is the example code shown in the link above.
WebView1.LoadCompleted += new Windows.UI.Xaml.Navigation.LoadCompletedEventHandler(WebView1_LoadCompleted);
//...Optimized
void WebView1_LoadCompleted(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e)
{
String uri = e.Uri.ToString();
}
© 2024 OneMinuteCode. All rights reserved.