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
This thread is a little old, but I had a problem I just solved with its help, so I may be able to slightly clarify some points.
To prevent the offending code from running at design time, I used
If System.ComponentModel.LicenseUsageMode.Runtime = 1 Then
myObject = New ObjectDefinition
End If
Works perfectly well.