Example #1
0
 /// <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
     }
 }
Example #2
0
        /// <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();
                }
            }
        }