Hi,
I was wondering if any one might know the answer to this. I am
attempting to apply the Model-View-ViewModel
pattern to my XBAP application. I created a UserControl(View) which is
created in a resource
(<views:MasterView x:Key="VIEW_Master" x:Shared="False" />). Th
resource is merged at this point into the
Application resources. The Master page sets its content to
{DynamicResource VIEW_Master}. The Master page
also sets its DataContext to a controller class. Before I put the
x:Shared = False in, every thing worked fine,
except if you refreshed the application (F5) it threw an exception.
The correct solution to this i found was to include
the x:Shared = False into the resource. As soon as i did that, all
data binding stopped working in the View.
After checking everything I released that the DataContext was no
longer inherited in the view, but when taking x:Shared = False out,
the DataContext is inherited. Does any one know why this happens and
possibly provide a solution for this?
Thanks,
Nick