I\'m getting an \"Object reference not set to an instance of an object\" error when I try to reload the Designer for my XAML UserControl
. Visual Studio highlig
I was able to solve the problem after giving a name to an object. It is VS2015, and my markup is different, but it could help somebody too:
<ResourceDictionary>
<DataTemplate x:Key="ThisKeySolvesDesignersNullRef"
DataType="local:MyViewModel">
<local:MyControl/>
</DataTemplate>
</ResourceDictionary>
In Visual Studio 2015 for WPF:
Hope this helps.
If you do this on the XAML you will just see the exception but not the popup with "View Exception Details", thus you need to do it in the Designer/Design view.