When navigating from a WPF page with Bing Maps Control for WPF I get the following exception message: “Cannot be disposed while still in the visual tree”.
In my case I use NavigationService.Navigate(URI, UriKind.Relative)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The solution is to set KeepAlive=”True” parameter for the Page object with Bing Maps Control. This way it won’t get disposed and will remain in the navigation Journal. This is further explained here: http://msdn.microsoft.com/en-us/library/ms750478.aspx#PageLifetime