How to locate the source of a binding error?

前端 未结 5 434
Happy的楠姐
Happy的楠姐 2020-12-08 05:05

How can I figure out what line of xaml contains the troublesome binding When my debug output is full of lines like the following:

System.Windows.Data Error: 5

5条回答
  •  独厮守ぢ
    2020-12-08 05:52

    You can download a tool called Snoop that will allow you to debug bindings. It provides a view of your WPF applications visual tree higlighting any binding errors that it finds.

    You can get some basic information about binding errors in the Output Window in Visual Studio. It will show the binding expression path error and the line on which the error occured.

提交回复
热议问题