private static void OnFormatBarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { global::System.Windows.Controls.RichTextBox rtb = d as global::System.Windows.Controls.RichTextBox; if (rtb == null) throw new Exception("A FormatBar can only be applied to a RichTextBox."); RichTextBoxFormatBarManager manager = new RichTextBoxFormatBarManager(); manager.AttachFormatBarToRichtextBox(rtb, e.NewValue as IRichTextBoxFormatBar); }
private static void OnFormatBarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { global::System.Windows.Controls.RichTextBox rtb = d as global::System.Windows.Controls.RichTextBox; if (rtb == null) { throw new Exception("A FormatBar can only be applied to a RichTextBox."); } RichTextBoxFormatBarManager manager = new RichTextBoxFormatBarManager(); manager.AttachFormatBarToRichtextBox(rtb, e.NewValue as IRichTextBoxFormatBar); }