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
If you have 'Object reference not set to an instance of an object' in XAML, but your application compiles and runs fine, you will usually find out that its cause is something in a constructor that can't be resolved at design time.
While you can find out the root of the problem with the help of other answers to this question, sometimes that is something you can't simply fix, you need it in your code exactly as you have it, but you don't want to see this error.
In this case, just click the "Disable project code" button located on the bottom of your designer view and Visual Studio designer will stop trying to construct an instance to provide design time data view.
See here for detailed information.