Example #1
0
        /// <summary>
        /// Callback for changes to the any text formatting property.
        /// Transfers the new value to explisit setting on a FlowDocument.
        /// </summary>
        private static void OnFormattingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RichTextBox richTextBox = (RichTextBox)d;

            if (richTextBox._implicitDocument)
            {
                richTextBox.TransferFormattingProperty(e.Property, e.NewValue);
            }
        }