相关疑难解决方法(0)

VS2012/Blend 5:调试在设计视图中发生的异常(仅)

我正在使用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

7
推荐指数
2
解决办法
3286
查看次数