我正在使用C#和XAML开发Metro风格的应用程序(适用于Windows 8).我已将我的viewmodels设置为用作设计时datacontexts,如下所示:
xmlns:vm="using:hub.ViewModels"
d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type=vm:ViewModels
Run Code Online (Sandbox Code Playgroud)
我的应用程序在运行时似乎运行正常,但在VS 2012和Blend的设计视图中,我偶尔会得到这个(无用的)错误消息:
An Exception was thrown. TargetException: Error in the application.
Stacktrace
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
InnerException: None
Run Code Online (Sandbox Code Playgroud)
这仅发生在设计视图-这意味着我不能设置周围的一切我INotifyPropertyChanged的()事件断点.
调试设计时错误的最佳方法是什么?
design-time blend microsoft-metro windows-8 visual-studio-2012