Is there any way to effectively debug WPF data bindings?

前端 未结 5 1568
别跟我提以往
别跟我提以往 2021-02-13 16:18

I am having a data binding problem (a separate question), and normally when I code, I can use the debugger to step through, and hit break points. What is probably a simple issu

5条回答
  •  离开以前
    2021-02-13 16:37

    add a dummy converter

    
    
    
    

    the converter

    public class DebuggerConverter : IValueConverter
    {
      #region IValueConverter Members
    
      public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
        // Set breakpoint here
        return value;
      }
    
      public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
        // Set breakpoint here
        return value;
      }
    
      #endregion
    }
    

    or use this and look at your output window

    
      
    
    

    hope this helps

提交回复
热议问题