WPF, 'Object reference not set to an instance of an object' in Designer

后端 未结 8 2275
一个人的身影
一个人的身影 2020-12-01 08:58

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

8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 09:50

    If your user control throws exception at design time, you can debug it. To do this, open Dll project with this user control in Visual Studio. Select another Visual Studio instance as executable for debugging. Start debugging. In the second (debugged) Visual Studio instance use your user control in the client XAML page. By this way, you can debug user control in design mode.

提交回复
热议问题