예제 #1
0
        private static void OnEditModeChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            HtmlRichEditor editor = (HtmlRichEditor)sender;

            if ((EditMode)e.NewValue == EditMode.Visual)
            {
                editor.SetVisualMode();
            }
            else
            {
                editor.SetSourceMode();
            }
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
        private static void OnStyleSheetChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            HtmlRichEditor editor = (HtmlRichEditor)sender;

            editor.SetNewStyleSheet((string)e.NewValue);
        }