I have a usercontrol in a content pane. If I use mvvm datatemplate to create my view:
<DataTemplate DataType="{x:Type platevm:PlateViewModel}" >
<plate:PlateView />
</DataTemplate>
The view is instantiated twice if in a content pane. So:
*bump*
This is killing my app, 10 days no response?
Hello,
I think the problem is coming from the incorrect usage of the DataTemplate.
If you want each ContentPane to use this DataTemplate for its Content, then you should create a style for the ContentPane and set this DataTemplate to the ContentTemplate property.
If you want a ContentPane to have a PlateView element for its content, then you should put a PlateView element as direct content.