简体   繁体   中英

Change the textbox(URL) text on back button press in Windows phone app

I have developed a web browser using the WebBrowser API in Visual Studio for a Windows Phone application) I have add a back button to this web browser. This is the code that I use for the back button to go to previous web page:

    private void backOnClick(object sender, RoutedEventArgs e) {
          webBrowser1.InvokeScript("eval", "history.go(-1)");    
    }

So now I want to change the textbox(URL) text considering the web page when press back button. How can I do that?

WebBrowser控件上的LoadComplete事件上,查看Source属性并将其设置到TextBox (这对于重定向也很有用)。

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