private static void OnEditModeChanged(object sender, DependencyPropertyChangedEventArgs e) { HtmlRichEditor editor = (HtmlRichEditor)sender; if ((EditMode)e.NewValue == EditMode.Visual) { editor.SetVisualMode(); } else { editor.SetSourceMode(); } }
private static void OnHtmlSourceChanged(object sender, DependencyPropertyChangedEventArgs e) { HtmlRichEditor editor = (HtmlRichEditor)sender; if (!editor._isInternalHtmlSourceChanged) { if (e.OldValue != e.NewValue) { editor.UpdateHtmlSource((string)e.NewValue); } } else { editor._isInternalHtmlSourceChanged = false; } }
private static void OnStyleSheetChanged(object sender, DependencyPropertyChangedEventArgs e) { HtmlRichEditor editor = (HtmlRichEditor)sender; editor.SetNewStyleSheet((string)e.NewValue); }