小编mar*_*tin的帖子

绑定表达式错误的例外

如果在调试期间发生绑定表达式错误,则会将错误记录到Visual Studio的"输出"窗口中.它看起来像这样:

System.Windows.Data Error: BindingExpression path error: 'User' property not found
on 'MainPageVM' 'MainPageVM' (HashCode=38694667). BindingExpression: Path='User.FullName'
DataItem='MainPageVM' (HashCode=38694667); target element is 'System.Windows.Controls.TextBlock'
Name=''); target property is 'Text' (type 'System.String')..
Run Code Online (Sandbox Code Playgroud)

有没有办法将此错误视为未处理的异常?如果发生绑定错误,我不希望我的Silverlight应用程序继续运行.

debugging wpf xaml binding visual-studio-2010

6
推荐指数
1
解决办法
652
查看次数

标签 统计

binding ×1

debugging ×1

visual-studio-2010 ×1

wpf ×1

xaml ×1