【问题标题】:"Cannot be disposed while still in the visual tree" for Bing Maps Control for WPFWPF 的 Bing Maps Control 的“无法在可视化树中处理”
【发布时间】:2011-08-24 13:29:26
【问题描述】:

当使用 Bing Maps Control for WPF 从 WPF 页面导航时,我收到以下异常消息:“在可视化树中时无法释放”。

就我而言,我使用 NavigationService.Navigate(URI, UriKind.Relative)

【问题讨论】:

    标签: wpf maps bing-maps


    【解决方案1】:

    解决方法是使用 Bing Maps Control 为 Page 对象设置 KeepAlive="True" 参数。这样它就不会被丢弃,并且会保留在导航日志中。这里进一步解释:http://msdn.microsoft.com/en-us/library/ms750478.aspx#PageLifetime

    【讨论】:

      猜你喜欢
      • 2021-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多