Hi,
Based on my understanding, the problems you are facing could be related to the following causes:
Federico Martinez
http://blogs.southworks.net/fmartinez
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.
Federico Martinez
http://blogs.southworks.net/fmartinez