/// <summary> /// PropertyChangedCallback for ErrorLinePosition /// </summary> private static void ErrorLinePositionChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { if (obj is WPFDocumentView) { WPFDocumentView owner = (WPFDocumentView)obj; // handle changed event here } }
/// <summary> /// PropertyChangedCallback for IsValidXaml /// </summary> private static void IsValidXamlChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { if (obj is WPFDocumentView) { WPFDocumentView owner = (WPFDocumentView)obj; if ((bool)args.NewValue) { owner.HideErrorUI(); } else { owner.ShowErrorUI(); } } }