【问题标题】:How Clear the Navigation History of Webview in Windows Store AppWindows Store App中如何清除Webview的导航历史
【发布时间】:2015-03-25 18:41:17
【问题描述】:

如何在Windows Store App(Windows 8.1)中清除Webview的导航历史

//我的WebView名称是MyWebView

MyWebView.Source= null; //抛出异常

有没有其他方法可以清除 Webview 导航历史记录

【问题讨论】:

    标签: windows-store-apps


    【解决方案1】:

    //我的WebView名称是MyWebView

    //清除数据上下文

    MyWebView.ClearValue(WebView.DataContextProperty);

    //清除宽度

    MyWebView.ClearValue(WebView.WidthProperty);

    //清除高度

    MyWebView.ClearValue(WebView.HeightProperty);

    【讨论】:

    • 虽然你提到的是一种清除属性的好方法,但它并没有清除web视图的导航历史,它只是删除了源url
    • 是的,这就像为对象的属性创建一个新实例。非常感谢您的回复 F.D.F Dev
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-08
    • 1970-01-01
    • 1970-01-01
    • 2014-07-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多