我們有一個非常大的項目。 Visual Studio調試輸出日誌包含幾個重複的WPF綁定錯誤。 例如:
如何尋找WPF綁定錯誤?
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='NaN' BindingExpression:Path=Width; DataItem='ContentPresenter' (Name=''); target element is 'ContentPresenter' (Name=''); target property is 'MaxWidth' (type 'Double')
當執行一些動作的行被打印。但是,這是一個非常繁重的操作,涉及數十個WPF類。
有沒有一種快速的方法來找到綁定錯誤的確切來源?一些可能有用的工具?