Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Notification not triggered when navigating to view ...

$
0
0
Hi,

Based on my understanding, the problems you are facing could be related to the following causes:
  • The error related to region.Deactivate(view) is due to the fact that you are probably trying to deactivate a view inside an ItemsControl region or one of its derived classes. Instead of trying to deactivate the view, please use region.Remove(view).
  • Related to the lack of ViewModel, I see that you have ((TaxpayerDetailsView) view).DataContext = null in your code. If this line is executing, and your view is a singleton, when you try to navigate to it again the container will provide you the same instance that you just removed. This instance will not have a view model as you cleared its DataContext property (and properties are only populated by the container when a new instance is created). If this is case, you can solve this by exporting the view as a non-singleton type or by removing the aforementioned line.
Hope this helps,

Federico Martinez
http://blogs.southworks.net/fmartinez

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>