适用于 WPF 的必应地图控件的"Cannot be disposed while still in the visual tree"



当使用Bing Maps Control for WPF从WPF页面导航时,我得到以下异常消息:"当仍在可视树中时不能被处理"。

在我的例子中,我使用了NavigationService。导航(URI, UriKind.Relative)

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

相关内容

最新更新