menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfRichTextBoxAdv - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfRichTextBoxAdv

    Represents the root element of a rich text editing control which operates on DocumentAdv objects.

    Inheritance
    System.Object
    SfRichTextBoxAdv
    Namespace: Syncfusion.Windows.Controls.RichTextBoxAdv
    Assembly: Syncfusion.SfRichTextBoxAdv.WPF.dll
    Syntax
    public class SfRichTextBoxAdv : Control
    Examples

    The following code example demonstrates how to define the SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf">
        <RichTextBoxAdv:DocumentAdv>
            <RichTextBoxAdv:SectionAdv>
                <RichTextBoxAdv:ParagraphAdv>
                    <RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
                </RichTextBoxAdv:ParagraphAdv>
            </RichTextBoxAdv:SectionAdv>
        </RichTextBoxAdv:DocumentAdv>
    </RichTextBoxAdv:SfRichTextBoxAdv>
    // Defines the control.
    Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv richTextBoxAdv = new Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv();
    

    DocumentAdv documentAdv = new DocumentAdv(); SectionAdv sectionAdv = new SectionAdv(); ParagraphAdv paragraphAdv = new ParagraphAdv(); SpanAdv spanAdv = new SpanAdv(); spanAdv.Text = "Hello world.";

    paragraphAdv.Inlines.Add(spanAdv); sectionAdv.Blocks.Add(paragraphAdv); documentAdv.Sections.Add(sectionAdv);

    // Defines the document for SfRichTextBoxAdv control. richTextBoxAdv.Document = documentAdv;

    ' Defines the control.
    Dim richTextBoxAdv As New Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv()
    
    Dim documentAdv As New DocumentAdv()
    Dim sectionAdv As New SectionAdv()
    Dim paragraphAdv As New ParagraphAdv()
    Dim spanAdv As New SpanAdv()
    spanAdv.Text = "Hello world."
    
    paragraphAdv.Inlines.Add(spanAdv)
    sectionAdv.Blocks.Add(paragraphAdv)
    documentAdv.Sections.Add(sectionAdv)
    
    ' Defines the document for SfRichTextBoxAdv control.
    richTextBoxAdv.Document = documentAdv

    Constructors

    SfRichTextBoxAdv()

    Initializes a new instance of the SfRichTextBoxAdv class.

    Declaration
    public SfRichTextBoxAdv()

    Fields

    AcceptsTabProperty

    Identifies the AcceptsTab dependency property.

    Declaration
    public static readonly DependencyProperty AcceptsTabProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the AcceptsTab dependency property.

    BackgroundProperty

    Identifies the Background dependency property.

    Declaration
    public static readonly DependencyProperty BackgroundProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the Background dependency property.

    CaretBrushProperty

    Identifies the CaretBrush dependency property.

    Declaration
    public static readonly DependencyProperty CaretBrushProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the CaretBrush dependency property.

    CaretWidthProperty

    Identifies the CaretWidth dependency property.

    Declaration
    public static readonly DependencyProperty CaretWidthProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the CaretWidth dependency property.

    DocumentProperty

    Identifies the Document dependency property.

    Declaration
    public static readonly DependencyProperty DocumentProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the Document dependency property.

    DocumentTitleProperty

    Identifies the DocumentTitle dependency property.

    Declaration
    public static readonly DependencyProperty DocumentTitleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the DocumentTitle dependency property.

    EditorSettingsProperty

    Identifies the EditorSettings dependency property.

    Declaration
    public static readonly DependencyProperty EditorSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the EditorSettings dependency property.

    EnableMiniToolBarProperty

    Identifies the EnableMiniToolBar dependency property.

    Declaration
    public static readonly DependencyProperty EnableMiniToolBarProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the EnableMiniToolBar dependency property.

    ExportSettingsProperty

    Identifies the ExportSettings dependency property.

    Declaration
    public static readonly DependencyProperty ExportSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the ExportSettings dependency property.

    FontNamesProperty

    Identifies the FontNames dependency property.

    Declaration
    public static readonly DependencyProperty FontNamesProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the FontNames dependency property.

    ForegroundProperty

    Identifies the Foreground dependency property.

    Declaration
    public static DependencyProperty ForegroundProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the Foreground dependency property.

    GripperSizeProperty

    Identifies the GripperSize dependency property.

    Declaration
    public static readonly DependencyProperty GripperSizeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the GripperSize dependency property.

    HorizontalScrollBarVisibilityProperty

    Identifies the HorizontalScrollBarVisibility dependency property.

    Declaration
    public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the HorizontalScrollBarVisibility dependency property.

    HtmlImportExportSettingsProperty

    Identifies the HtmlImportExportSettings dependency property.

    Declaration
    public static readonly DependencyProperty HtmlImportExportSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the HtmlImportExportSettings dependency property.

    IsReadOnlyProperty

    Identifies the IsReadOnly dependency property.

    Declaration
    public static readonly DependencyProperty IsReadOnlyProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the IsReadOnly dependency property.

    IsVirtualizingProperty

    Identifies the IsVirtualizing dependency property.

    Declaration
    public static readonly DependencyProperty IsVirtualizingProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the IsVirtualizing dependency property.

    IsZoomEnabledProperty

    Identifies the IsZoomEnabled dependency property.

    Declaration
    public static readonly DependencyProperty IsZoomEnabledProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the IsZoomEnabled dependency property.

    LayoutTypeProperty

    Identifies the LayoutType dependency property.

    Declaration
    public static readonly DependencyProperty LayoutTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the LayoutType dependency property.

    LoadAsyncSettingsProperty

    Identifies the LoadAsyncSettings dependency property.

    Declaration
    public static readonly DependencyProperty LoadAsyncSettingsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the LoadAsyncSettings dependency property.

    LostFocusBehaviorProperty

    Identifies the LostFocusBehavior dependency property.

    Declaration
    public static readonly DependencyProperty LostFocusBehaviorProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    OverridesDocumentBackgroundProperty

    Identifies the OverridesDocumentBackground dependency property.

    Declaration
    public static readonly DependencyProperty OverridesDocumentBackgroundProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the OverridesDocumentBackground dependency property.

    PaddingProperty

    Identifies the Padding dependency property.

    Declaration
    public static readonly DependencyProperty PaddingProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the Padding dependency property.

    ParagraphCountProperty

    Identifies the ParagraphCount dependency property.

    Declaration
    public static readonly DependencyProperty ParagraphCountProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the ParagraphCount dependency property.

    SelectionBrushProperty

    Identifies the SelectionBrush dependency property.

    Declaration
    public static readonly DependencyProperty SelectionBrushProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the SelectionBrush dependency property.

    SpellCheckerProperty

    Identifies the SpellChecker dependency property.

    Declaration
    public static readonly DependencyProperty SpellCheckerProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the SpellChecker dependency property.

    TextWrappingProperty

    Identifies the TextWrapping dependency property.

    Declaration
    public static readonly DependencyProperty TextWrappingProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the TextWrapping dependency property.

    UseCtrlClickToFollowHyperlinkProperty

    Identifies the UseCtrlClickToFollowHyperlink​​​ property.

    Declaration
    public static readonly DependencyProperty UseCtrlClickToFollowHyperlinkProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the UseCtrlClickToFollowHyperlink​​​ dependency property.

    VerticalScrollBarVisibilityProperty

    Identifies the VerticalScrollBarVisibility dependency property.

    Declaration
    public static readonly DependencyProperty VerticalScrollBarVisibilityProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the VerticalScrollBarVisibility dependency property.

    WordCountProperty

    Identifies the WordCount dependency property.

    Declaration
    public static readonly DependencyProperty WordCountProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the WordCount dependency property.

    ZoomFactorProperty

    Identifies the ZoomFactor dependency property.

    Declaration
    public static readonly DependencyProperty ZoomFactorProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    The identifier for the ZoomFactor dependency property.

    Properties

    AcceptsTab

    Gets or sets a value that indicates how the SfRichTextBoxAdv control responds when the user presses the TAB key.

    Declaration
    public bool AcceptsTab { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if pressing the TAB key inserts a tab character at the current cursor position or navigates to the next cell if current cursor position is within a table cell. False if pressing the TAB key moves the focus to the next control that is marked as a tab stop and does not insert a tab character or perform cell navigation. The default value is false.

    Examples

    The following code example demonstrates how to specify the SfRichTextBoxAdv control to accept Tab character as input.

    <!-- Defines the SfRichTextBoxAdv control that accepts Tab character as input. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" AcceptsTab="True"/>
    // Defines the control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.AcceptsTab = true;
    ' Defines the control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.AcceptsTab = True

    AddToDictionaryCommand

    Represents the AddToDictionary command, which requests that any misspelled word at the current position be added to the custom dictionary.

    Declaration
    public static RoutedUICommand AddToDictionaryCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    AfterSpacingCommand

    Represents the AfterSpacing command, which requests to apply after spacing for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand AfterSpacingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    AllowDownloadingImages

    Gets or sets a value indicating whether the SfRichTextBoxAdv control can download the images from the internet.

    Declaration
    public static bool AllowDownloadingImages { get; set; }
    Property Value
    Type Description
    System.Boolean

    True, if the SfRichTextBoxAdv control can download the images from the internet. Otherwise False. The default is True.

    ApplyStyleCommand

    Represents the ApplyStyle command, which requests to apply style for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ApplyStyleCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    AutoFitTableCommand

    Represents the AutoFitTable Command, which fits the columns width of selected table in SfRichTextBoxAdv control based on commmand parameter of type AutoFitType. Default value for command parameter is FitToContents.

    Declaration
    public static RoutedUICommand AutoFitTableCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand
    Examples

    The following code example demonstrates how to bind the AutoFitTableCommand to perform auto fit to window for selected table of SfRichTextBoxAdv control.

    <Button Content="AutoFitContents" Command="RichTextBoxAdv:SfRichTextBoxAdv.AutoFitTableCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="FitToWindow" />
    <!-- Defines the SfRichTextBoxAdv control --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" />
    // Checks whether the command can be executed in current context.
    if (SfRichTextBoxAdv.AutoFitTableCommand.CanExecute(AutoFitType.FitToWindow, richTextBoxAdv))
        // Executes the command.
        SfRichTextBoxAdv.AutoFitTableCommand.Execute(AutoFitType.FitToWindow, richTextBoxAdv);

    Background

    Gets or sets a brush that provides the background of the SfRichTextBoxAdv.

    Declaration
    public Brush Background { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The brush that provides the background of the SfRichTextBoxAdv. The default value is a SolidColorBrush with color of Black.

    Examples

    The following code example demonstrates how to define the background for SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with background as Blue. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Background="#FF0000FF"/>
    // Defines the SfRichTextBoxAdv control with background as Blue.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0xFF));
    ' Defines the SfRichTextBoxAdv control with background as Blue.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.Background = New SolidColorBrush(Color.FromArgb(&HFF, &H0, &H0, &HFF))

    BackSpaceKeyCommand

    Represents the BackSpaceKey command, which requests to perform Backspace shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand BackSpaceKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    BaselineAlignmentCommand

    Represents the BaselineAlignment command, which requests to apply BaselineAlignment for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand BaselineAlignmentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    BeforeSpacingCommand

    Represents the BeforeSpacing command, which requests to apply before spacing for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand BeforeSpacingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    BoldCommand

    Represents the Bold command, which requests to apply bold format for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand BoldCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CaretBrush

    Gets or sets the caret brush of the SfRichTextBoxAdv.

    Declaration
    public Brush CaretBrush { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The caret brush of the SfRichTextBoxAdv. The default value is a SolidColorBrush with auto color.

    Examples

    The following code example demonstrates how to define the caret brush for SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with caret brush as Blue. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" CaretBrush="#FF0000FF"/>
    // Defines the SfRichTextBoxAdv control with caret brush as Blue.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.CaretBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0xFF));
    ' Defines the SfRichTextBoxAdv control with caret brush as Blue.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.CaretBrush = New SolidColorBrush(Color.FromArgb(&HFF, &H0, &H0, &HFF))

    CaretWidth

    Gets or sets the caret width of the SfRichTextBoxAdv.

    Declaration
    public double CaretWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The caret width of the SfRichTextBoxAdv.

    Remarks

    The default value is 1 Pixel.

    Examples

    The following code example demonstrates how to define the caret width for SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with caret brush as Blue. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" CaretWidth="2"/>
    // Defines the SfRichTextBoxAdv control with caret brush as Blue.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.CaretWidth = 2;
    ' Defines the SfRichTextBoxAdv control with caret brush as Blue.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.CaretWidth = 2

    CellBottomMarginCommand

    Identifies the CellBottomMargin command.

    Declaration
    public static RoutedUICommand CellBottomMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CellContentAlignmentCommand

    Identifies the CellContentAlignment command.

    Declaration
    public static RoutedUICommand CellContentAlignmentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CellLeftMarginCommand

    Identifies the CellLeftMargin command.

    Declaration
    public static RoutedUICommand CellLeftMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CellRightMarginCommand

    Identifies the CellRightMargin command.

    Declaration
    public static RoutedUICommand CellRightMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CellSpacingCommand

    Identifies the CellSpacing command.

    Declaration
    public static RoutedUICommand CellSpacingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CellTopMarginCommand

    Identifies the CellTopMargin command.

    Declaration
    public static RoutedUICommand CellTopMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CellVerticalAlignmentCommand

    Identifies the CellVerticalAlignment command.

    Declaration
    public static RoutedUICommand CellVerticalAlignmentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ChangeAllSpellingCommand

    Represents the ChangeAllSpelling command, which requests that all occurrences of any misspelled word at the current position be changed.

    Declaration
    public static RoutedUICommand ChangeAllSpellingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ChangeSpellingCommand

    Represents the ChangeSpelling command, which requests that any misspelled word at the current position be changed.

    Declaration
    public static RoutedUICommand ChangeSpellingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CheckSpellingCommand

    Represents the CheckSpelling command, which requests that the document in a SfRichTextBoxAdv control be checked for spelling mistakes.

    Declaration
    public static RoutedUICommand CheckSpellingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ClearFormattingCommand

    Represents the ApplyStyle command, which requests to clear formatting for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ClearFormattingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlDownKeyCommand

    Represents the ControlDownKey command, which requests to perform CTRL + Down shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlDownKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlEndKeyCommand

    Represents the ControlEndKey command, which requests to perform CTRL + End shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlEndKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlHomeKeyCommand

    Represents the ControlHomeKey command, which requests to perform CTRL + Home shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlHomeKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlLeftKeyCommand

    Represents the ControlLeftKey command, which requests to perform CTRL + Left shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlLeftKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlRightKeyCommand

    Represents the ControlRightKey command, which requests to perform CTRL + Right shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlRightKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlShiftDownKeyCommand

    Represents the ControlShiftDownKey command, which requests to perform CTRL + Shift + Down shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlShiftDownKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlShiftEndKeyCommand

    Represents the ControlShiftEndKey command, which requests to perform CTRL + Shift + End shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlShiftEndKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlShiftHomeKeyCommand

    Represents the ControlShiftHomeKey command, which requests to perform CTRL + Shift Home shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlShiftHomeKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlShiftLeftKeyCommand

    Represents the ControlShiftLeftKey command, which requests to perform CTRL + Shit + Left shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlShiftLeftKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlShiftRightKeyCommand

    Represents the ControlShiftRightKey command, which requests to perform CTRL + Shift + Right shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlShiftRightKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlShiftUpKeyCommand

    Represents the ControlShiftUpKey command, which requests to perform CTRL + Shift + Up shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlShiftUpKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ControlUpKeyCommand

    Represents the ControlUpKey command, which requests to perform CTRL + Up shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ControlUpKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CopyCommand

    Represents the Copy command, which requests that the selected contents in a SfRichTextBoxAdv control be copied to the clipboard.

    Declaration
    public static RoutedUICommand CopyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CopyHyperlinkCommand

    Represents the CopyHyperlink command, which requests that any hyperlink at the current position be copied.

    Declaration
    public static RoutedUICommand CopyHyperlinkCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    CurrentPageNumber

    Gets the current page number.

    Declaration
    public int CurrentPageNumber { get; }
    Property Value
    Type Description
    System.Int32

    If the SfRichTextBoxAdv control is loaded, then returns the page number of the first page in visible region. Otherwise returns zero.

    CutCommand

    Represents the Cut command, which requests that the selected contents in a SfRichTextBoxAdv control be moved to the clipboard.

    Declaration
    public static RoutedUICommand CutCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DecreaseFontSizeCommand

    Represents the DecreaseFontSize command, which requests to decrease font size for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DecreaseFontSizeCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DecreaseIndentCommand

    Represents the DecreaseIndent command, which requests to decrease the left indent for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DecreaseIndentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DefaultCellBottomMarginCommand

    Identifies the DefaultCellBottomMargin command.

    Declaration
    public static RoutedUICommand DefaultCellBottomMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DefaultCellLeftMarginCommand

    Identifies the DefaultCellLeftMargin command.

    Declaration
    public static RoutedUICommand DefaultCellLeftMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DefaultCellRightMarginCommand

    Identifies the DefaultCellRightMargin command.

    Declaration
    public static RoutedUICommand DefaultCellRightMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DefaultCellTopMarginCommand

    Identifies the DefaultCellTopMargin command.

    Declaration
    public static RoutedUICommand DefaultCellTopMarginCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DeleteAllCommentsCommand

    Represents the DeleteAllComments command, which requests that all comments in the document be deleted.

    Declaration
    public static RoutedUICommand DeleteAllCommentsCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DeleteColumnCommand

    Represents the DeleteColumn command, which requests to delete the entire column of a table at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DeleteColumnCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DeleteCommentCommand

    Represents the DeleteComment command, which requests that any comment at the current position be deleted.

    Declaration
    public static RoutedUICommand DeleteCommentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DeleteKeyCommand

    Represents the DeleteKey command, which requests to perform Delete shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DeleteKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DeleteRowCommand

    Represents the DeleteRow command, which requests to delete the entire row of the table at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DeleteRowCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    DeleteTableCommand

    Represents the DeleteTable command, which requests to delete the entire table at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DeleteTableCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    Document

    Gets or Sets the DocumentAdv.

    Declaration
    public DocumentAdv Document { get; set; }
    Property Value
    Type Description
    DocumentAdv

    The DocumentAdv instance loaded in the SfRichTextBoxAdv.

    Examples

    The following code example demonstrates how to define the document for SfRichTextBoxAdv

    <!-- Defines the SfRichTextBoxAdv control. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv">
        <RichTextBoxAdv:DocumentAdv>
            <!-- Add any number of sections here. -->
            <RichTextBoxAdv:SectionAdv>
                <!-- Add any number of paragraphs and tables here. -->
                <RichTextBoxAdv:ParagraphAdv>
                    <!-- Add any number of spans, images, comments and hyperlink fields here. -->
                    <RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
                </RichTextBoxAdv:ParagraphAdv>
            </RichTextBoxAdv:SectionAdv>
        </RichTextBoxAdv:DocumentAdv>
     </RichTextBoxAdv:SfRichTextBoxAdv>
    // Defines the control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    

    // Defines the document. DocumentAdv documentAdv = new DocumentAdv();

    // Defines and adds a section to the document. SectionAdv sectionAdv = new SectionAdv();

    // Add any number of sections here. documentAdv.Sections.Add(sectionAdv);

    // Defines and adds a paragraph to the section. ParagraphAdv paragraphAdv = new ParagraphAdv();

    // Add any number of paragraphs, tables here. sectionAdv.Blocks.Add(paragraphAdv);

    // Defines and add a span to the paragraph. SpanAdv spanAdv = new SpanAdv(); spanAdv.Text = "Hello world.";

    // Add any number of spans, images, comments and hyperlink fields here. paragraphAdv.Inlines.Add(spanAdv);

    // Defines the document for SfRichTextBoxAdv control. richTextBoxAdv.Document = documentAdv;

    ' Defines the control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    
    ' Defines the document.
    Dim documentAdv As New DocumentAdv()
    
    ' Defines and adds a section to the document.
    Dim sectionAdv As New SectionAdv()
    
    ' Add any number of sections here.
    documentAdv.Sections.Add(sectionAdv)
    
    ' Defines and adds a paragraph to the section.
    Dim paragraphAdv As New ParagraphAdv()
    
    ' Add any number of paragraphs, tables here.
    sectionAdv.Blocks.Add(paragraphAdv)
    
    ' Defines and add a span to the paragraph.
    Dim spanAdv As New SpanAdv()
    spanAdv.Text = "Hello world."
    
    ' Add any number of spans, images, comments and hyperlink fields here.
    paragraphAdv.Inlines.Add(spanAdv)
    
    ' Defines the document for SfRichTextBoxAdv control.
    richTextBoxAdv.Document = documentAdv
    See Also
    DocumentAdv

    DocumentTitle

    Gets or sets the title of the document.

    Declaration
    public string DocumentTitle { get; set; }
    Property Value
    Type Description
    System.String

    The title of the document

    Examples

    The following code example demonstrates how to define the tile for the document in SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with title for document. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" DocumentTitle="My Notes"/>
    // Defines the SfRichTextBoxAdv control with title for document.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.DocumentTitle = "My Notes";
    ' Defines the SfRichTextBoxAdv control with title for document.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.DocumentTitle = "My Notes"

    DownKeyCommand

    Represents the DownKey command, which requests to perform Down shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand DownKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    EditorSettings

    Gets or sets the settings for editing operations.

    Declaration
    public EditorSettings EditorSettings { get; set; }
    Property Value
    Type
    EditorSettings
    Examples

    The following code example demonstrates how to define editor settings for a SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Pages">
        <RichTextBoxAdv:SfRichTextBoxAdv.EditorSettings>
            <!-- Defines editor settings with live resizing -->
            <RichTextBoxAdv:EditorSettings ResizingMode="Live" />
        </RichTextBoxAdv:SfRichTextBoxAdv.EditorSettings>
    </RichTextBoxAdv:SfRichTextBoxAdv>
    // Defines the control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    

    //Defines the editor settings with live resizing. EditorSettings editorSettings = new EditorSettings(); editorSettings.ResizingMode = ResizingMode.Live;

    richTextBoxAdv.EditorSettings = editorSettings;

    /// ' Defines the control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    
    'Defines the editor settings with live resizing.
    Dim loadAsyncSettings As New EditorSettings()
    editorSettings.ResizingMode = ResizingMode.Live
    
    richTextBoxAdv.EditorSettings = editorSettings

    EnableMiniToolBar

    Gets or sets a value indicating whether mini toolbar needs to be enabled in SfRichTextBoxAdv.

    Declaration
    public bool EnableMiniToolBar { get; set; }
    Property Value
    Type Description
    System.Boolean

    True, if mini toolbar is enabled. Otherwise False. The default is true.

    Examples

    The following code example demonstrates how to enable or disable mini toolbar in SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with mini toolbar disabled. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" EnableMiniToolBar="False"/>
    // Defines the SfRichTextBoxAdv control with mini toolbar disabled.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.EnableMiniToolBar = false;
    ' Defines the SfRichTextBoxAdv control with mini toolbar disabled.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.EnableMiniToolBar = False

    EndKeyCommand

    Represents the EndKey command, which requests to perform End shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand EndKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    EnterKeyCommand

    Represents the EnterKey command, which requests to perform Enter shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand EnterKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ExportSettings

    Gets or sets the settings for export operation.

    Declaration
    public ExportSettings ExportSettings { get; set; }
    Property Value
    Type
    ExportSettings

    FirstLineIndentCommand

    Represents the FirstLineIndent command, which requests to apply first line indent for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand FirstLineIndentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    FontColorCommand

    Represents the FontColor command, which requests to apply font color for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand FontColorCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    FontFamilyCommand

    Represents the FontFamily command, which requests to apply font family for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand FontFamilyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    FontNames

    Declaration
    public ObservableCollection<string> FontNames { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<System.String>

    FontSizeCommand

    Represents the FontSize command, which requests to apply font size for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand FontSizeCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    Foreground

    Gets or sets a brush that describes the foreground color of the SfRichTextBoxAdv control.

    Declaration
    public Brush Foreground { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The brush that paints the foreground of the SfRichTextBoxAdv control. The default value is a SolidColorBrush with color of White.

    Examples

    The following code example demonstrates how to define the foreground for SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with foreground as Red. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Foreground="#FFFF0000"/>
    // Defines the SfRichTextBoxAdv control with foreground as Red.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0x0, 0x00));
    ' Defines the SfRichTextBoxAdv control with foreground as Red.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.Foreground = New SolidColorBrush(Color.FromArgb(&HFF, &HFF, &H0, &H0))

    GripperSize

    Gets or sets the Gripper size used for Touch selection in SfRichTextBoxAdv.

    Declaration
    public double GripperSize { get; set; }
    Property Value
    Type Description
    System.Double

    The double value of Gripper size.

    Examples

    The following code example demonstrates how to define gripper size for the SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with gripper size as 20. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" GripperSize="20"/>
    // Defines the SfRichTextBoxAdv control with gripper size as 20.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.GripperSize = 20;
    ' Defines the SfRichTextBoxAdv control with gripper size as 20.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.GripperSize = 20

    HighlightColorCommand

    Represents the HighlightColor command, which requests to apply HighlightColor for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand HighlightColorCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    HomeKeyCommand

    Represents the HomeKey command, which requests to perform Home shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand HomeKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    HorizontalScrollBar

    Gets the Horizontal ScrollBar of the SfRichTextBoxAdv.

    Declaration
    public ScrollBar HorizontalScrollBar { get; }
    Property Value
    Type
    System.Windows.Controls.Primitives.ScrollBar

    HorizontalScrollBarVisibility

    Gets or sets a value that indicates whether the horizontal scroll bar of the SfRichTextBoxAdv control needs to be visible.

    Declaration
    public bool HorizontalScrollBarVisibility { get; set; }
    Property Value
    Type Description
    System.Boolean

    The horizontal scroll bar of the SfRichTextBoxAdv control needs to be visible or not.

    Examples

    The following code example demonstrates how to enable or disable horizontal scroll bar visibility in SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with horizontal scroll bar visibility disabled. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" HorizontalScrollBarVisibility="False"/>
    // Defines the SfRichTextBoxAdv control with horizontal scroll bar visibility disabled.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.HorizontalScrollBarVisibility = false;
    ' Defines the SfRichTextBoxAdv control with horizontal scroll bar visibility disabled.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.HorizontalScrollBarVisibility = False

    HtmlImportExportSettings

    Gets or sets the HtmlImportExportSettings specifies the settings for HTML import and export.

    Declaration
    public HtmlImportExportSettings HtmlImportExportSettings { get; set; }
    Property Value
    Type Description
    HtmlImportExportSettings

    The HtmlImportExportSettings instance specifies the settings for HTML import and export.

    Examples

    The following code example demonstrates how to define Html import and export settings for a SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Pages">
        <RichTextBoxAdv:SfRichTextBoxAdv.HtmlImportExportSettings>
            <!-- Defines page loading settings -->
            <RichTextBoxAdv:HtmlImportExportSettings IsOverwriteFontFamily="True" FontFamily="Times New Roman" />
        </RichTextBoxAdv:SfRichTextBoxAdv.HtmlImportExportSettings>
    </RichTextBoxAdv:SfRichTextBoxAdv>
    // Defines the control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    

    //Defines the html import and export settings. HtmlImportExportSettings htmlImportExportSettings = new HtmlImportExportSettings(); htmlImportExportSettings.IsOverwriteFontFamily = true; htmlImportExportSettings.FontFamily = "Times New Roman";

    richTextBoxAdv.HtmlImportExportSettings = htmlImportExportSettings;

    ' Defines the control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    
    'Defines the html import and export settings.
    Dim htmlImportExportSettings As New HtmlImportExportSettings()
    htmlImportExportSettings.IsOverwriteFontFamily = True
    htmlImportExportSettings.FontFamily = "Times New Roman"
    
    richTextBoxAdv.HtmlImportExportSettings = htmlImportExportSettings

    IgnoreAllSpellingErrorsCommand

    Represents the IgnoreAllSpellingErrors command, which requests that all occurrences of any misspelled word at the current position be ignored.

    Declaration
    public static RoutedUICommand IgnoreAllSpellingErrorsCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    IncreaseFontSizeCommand

    Represents the IncreaseFontSize command, which requests to increase font size for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand IncreaseFontSizeCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    IncreaseIndentCommand

    Represents the IncreaseIndent command, which requests to apply increase indent for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand IncreaseIndentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    InputBindings

    Gets the collection of input bindings associated with this element.

    Declaration
    public InputBindingCollection InputBindings { get; }
    Property Value
    Type Description
    System.Windows.Input.InputBindingCollection

    The collection of input bindings.

    InsertBreakCommand

    Represents the InsertBreak command, which inserts a break at current position in SfRichTextBoxAdv control based on optional command parameter of type BreakType. By default, page break will be inserted.

    Declaration
    public static RoutedUICommand InsertBreakCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand
    Examples

    The following code example demonstrates how to insert a page break using command in the SfRichTextBoxAdv control.

    <Button Content="Insert Break" Command="RichTextBoxAdv:SfRichTextBoxAdv.InsertBreakCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="PageBreak" />
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Grid.Row="1" xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf" />
    // Executes insert break command to insert page break.
    SfRichTextBoxAdv.InsertBreakCommand.Execute(BreakType.PageBreak, richTextBoxAdv);
    ' Executes insert break command to insert page break.
    SfRichTextBoxAdv.InsertBreakCommand.Execute(BreakType.PageBreak, richTextBoxAdv)

    InsertColumnCommand

    Represents the InsertColumn Command, which requests to insert a column at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand InsertColumnCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    InsertHyperlinkCommand

    Represents the InsertHyperlink command, which inserts a hyperlink at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand InsertHyperlinkCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand
    Examples

    The following code example demonstrates how to insert a hyperlink using command in the SfRichTextBoxAdv control.

    <Button Content="Insert Table" Command="RichTextBoxAdv:SfRichTextBoxAdv.InsertHyperlinkCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="www.google.com" />
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Grid.Row="1" xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf" />
    // Executes insert hyperlink command.
    SfRichTextBoxAdv.InsertHyperlinkCommand.Execute("www.google.com", richTextBoxAdv);;
    ' Executes insert hyperlink command.
    SfRichTextBoxAdv.InsertHyperlinkCommand.Execute("www.google.com", richTextBoxAdv)

    InsertPictureCommand

    Represents the InsertPicture command, which inserts a picture at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand InsertPictureCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand
    Examples

    The following code example demonstrates how to insert a picture using command in the SfRichTextBoxAdv control.

    <Button Content="Insert Table" Command="RichTextBoxAdv:SfRichTextBoxAdv.InsertPictureCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="c:/users/user1/pictures/rose.png" />
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Grid.Row="1" xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf" />
    // Executes insert picture command.
    SfRichTextBoxAdv.InsertPictureCommand.Execute("c:/users/user1/pictures/rose.png", richTextBoxAdv);;
    ' Executes insert picture command.
    SfRichTextBoxAdv.InsertPictureCommand.Execute("c:/users/user1/pictures/rose.png", richTextBoxAdv)

    InsertRowCommand

    Represents the InsertRow command, which requests to insert a row at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand InsertRowCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    InsertTableCommand

    Represents the InsertTable command, which inserts a table at current position in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand InsertTableCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand
    Examples

    The following code example demonstrates how to insert a table using command in the SfRichTextBoxAdv control.

    <Button Content="Insert Table" Command="RichTextBoxAdv:SfRichTextBoxAdv.InsertTableCommand" CommandTarget="{Binding ElementName=richTextBoxAdv}" CommandParameter="2,3" />
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Grid.Row="1" xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf" />
    // Executes insert table command.
    SfRichTextBoxAdv.InsertTableCommand.Execute("2,3", richTextBoxAdv);;
    ' Executes insert table command.
    SfRichTextBoxAdv.InsertTableCommand.Execute("2,3", richTextBoxAdv)

    IsReadOnly

    Gets or sets the value that determines if the user can change the content in the SfRichTextBoxAdv.

    Declaration
    public bool IsReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    The SfRichTextBoxAdv is read-only or not.

    Examples

    The following code example demonstrates how to enable or disable read only mode in SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with read only mode. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" IsReadOnly="True"/>
    // Defines the SfRichTextBoxAdv control with read only mode.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.IsReadOnly = true;
    ' Defines the SfRichTextBoxAdv control with read only mode.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.IsReadOnly = True

    IsVirtualizing

    Gets or sets a value that indicates whether the SfRichTextBoxAdv control is virtualizing its contents.

    Declaration
    public bool IsVirtualizing { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the SfRichTextBoxAdv control is virtualizing its contents. False if the SfRichTextBoxAdv control does not virtualizing its contents. The default value is true.

    Remarks

    Virtualization is a technique by which a subset of UI elements are generated from a larger number of data items based on which items are visible on-screen to utilize minimal memory. Generating many UI elements when only a few elements might be on the screen can adversely affect the performance of your application. The SfRichTextBoxAdv control calculates the number of visible items and creates UI elements only for visible items. Also, This property does not have any effect on the Block mode.

    Examples

    The following code example demonstrates how to disable viritualization for the SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with virtualization disabled. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" IsVirtualizing="False"/>
    // Defines the SfRichTextBoxAdv control with virtualization disabled.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.IsVirtualizing = false;
    ' Defines the SfRichTextBoxAdv control with virtualization disabled.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.IsVirtualizing = False

    IsZoomEnabled

    Get or Sets a value that indicates whether zooming needs to be enabled in the SfRichTextBoxAdv.

    Declaration
    public bool IsZoomEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    Zoom is enabled in the SfRichTextBoxAdv is enabled or not.

    Examples

    The following code example demonstrates how to enable or disable zooming operation in SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with zooming operation disabled. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" IsZoomEnabled="False"/>
    // Defines the SfRichTextBoxAdv control with zooming operation disabled.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.IsZoomEnabled = false;
    ' Defines the SfRichTextBoxAdv control with zooming operation disabled.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.IsZoomEnabled = False

    ItalicCommand

    Represents the Italic command, which requests to apply italic format for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ItalicCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    LayoutType

    Gets or Sets the LayoutType of the SfRichTextBoxAdv control.

    Declaration
    public LayoutType LayoutType { get; set; }
    Property Value
    Type Description
    LayoutType

    The LayoutType of the SfRichTextBoxAdv control.

    Remarks

    The default is LayoutType.Pages.

    Examples

    The following code example demonstrates how to define the SfRichTextBoxAdv control with continuous layout type.

    <!-- Defines the SfRichTextBoxAdv control with continuous layout type. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Continuous"/>
    // Defines the SfRichTextBoxAdv control with continuous layout type.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.LayoutType = LayoutType.Continuous;
    ' Defines the SfRichTextBoxAdv control with continuous layout type.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.LayoutType = LayoutType.Continuous
    See Also
    LayoutType

    LayoutTypeCommand

    Represents the LayoutType command, which requests that the LayoutType in a SfRichTextBoxAdv control be changed

    Declaration
    public static RoutedUICommand LayoutTypeCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    LeftIndentCommand

    Represents the LeftIndent command, which requests to apply left indent for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand LeftIndentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    LeftKeyCommand

    Represents the LeftKey command, which requests to perform Left shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand LeftKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    LineSpacingCommand

    Represents the LineSpacing command, which requests to apply line spacing for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand LineSpacingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    LineSpacingTypeCommand

    Represents the LineSpacingType command, which requests to apply LineSpacingType for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand LineSpacingTypeCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    LoadAsyncSettings

    Gets or sets the settings for asynchronous document loading operation.

    Declaration
    public LoadAsyncSettings LoadAsyncSettings { get; set; }
    Property Value
    Type
    LoadAsyncSettings
    Examples

    The following code example demonstrates how to define asynchronous loading settings for a SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Pages">
        <RichTextBoxAdv:SfRichTextBoxAdv.LoadAsyncSettings>
            <!-- Defines page loading settings -->
            <RichTextBoxAdv:LoadAsyncSettings InitialPageLoadCount="2" IncrementalPageLoadCount="1" />
        </RichTextBoxAdv:SfRichTextBoxAdv.LoadAsyncSettings>
    </RichTextBoxAdv:SfRichTextBoxAdv>
    // Defines the control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    

    //Defines the asycnhronous loading settings. LoadAsyncSettings loadAsyncSettings = new LoadAsyncSettings(); loadAsyncSettings.InitialPageLoadCount = 2; loadAsyncSettings.IncrementalPageLoadCount = 1;

    richTextBoxAdv.LoadAsyncSettings = loadAsyncSettings;

    /// ' Defines the control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    
    'Defines the asycnhronous loading settings.
    Dim loadAsyncSettings As New LoadAsyncSettings()
    loadAsyncSettings.InitialPageLoadCount = 2
    loadAsyncSettings.IncrementalPageLoadCount = 1
    
    richTextBoxAdv.LoadAsyncSettings = loadAsyncSettings

    LostFocusBehavior

    Gets or sets a value that indicates whether the SfRichTextBoxAdv control displays the caret or selection highlight when the control does not have focus. The default value is LostFocusBehavior.None.

    Declaration
    public LostFocusBehavior LostFocusBehavior { get; set; }
    Property Value
    Type Description
    LostFocusBehavior

    One of the LostFocusBehavior values that specifies the desired value.

    Examples

    The following code example demonstrates how to define the selection visibility on control lost focus SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with selection highlight visible on lost focus. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LostFocusBehavior="ShowSelection"/>
    // Defines the SfRichTextBoxAdv control with mini toolbar disabled.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.LostFocusBehavior = LostFocusBehavior.ShowSelection;
    ' Defines the SfRichTextBoxAdv control with selection highlight visible on lost focus.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.LostFocusBehavior = LostFocusBehavior.ShowSelection

    MergeSelectedCellsCommand

    Represents the MergeSelectedCells command, which requests to merge the currently selected cells in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand MergeSelectedCellsCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    NavigateHyperlinkCommand

    Represents the NavigateHyperlink command, which requests that any hyperlink at the current position be navigated.

    Declaration
    public static RoutedUICommand NavigateHyperlinkCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    NewCommentCommand

    Represents the NewComment command, which requests to add a comment at the current position.

    Declaration
    public static RoutedUICommand NewCommentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    NewDocumentCommand

    Represents the NewDocument command, which requests to create a new document in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand NewDocumentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    NextCommentCommand

    Represents the NextComment command, which requests navigation to any next comment in the document.

    Declaration
    public static RoutedUICommand NextCommentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    OpenDocumentCommand

    Represents the OpenDocument command, which requests to open an existing document in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand OpenDocumentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    OverridesDocumentBackground

    Gets or sets a value that indicates whether the background of SfRichTextBoxAdv overrides the document background when the LayoutType is Continuous.

    Declaration
    public bool OverridesDocumentBackground { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if SfRichTextBoxAdv background overrides the document background when the LayoutType is Continuous. Otherwise False. The default is false.

    Remarks

    This property affects the background only when the LayoutType is Continuous.

    Examples

    The following code example demonstrates how to override the document background in a SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with document background overridden. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Continuous" Background="#FF808080" OverridesDocumentBackground="True"/>
    // Defines the SfRichTextBoxAdv control with document background overridden.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.LayoutType = LayoutType.Continuous;
    richTextBoxAdv.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x80, 0x80, 0x80));
    richTextBoxAdv.OverridesDocumentBackground = true;
    ' Defines the SfRichTextBoxAdv control with document background overridden.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.LayoutType = LayoutType.Continuous
    richTextBoxAdv.Background = New SolidColorBrush(Color.FromArgb(&HFF, &H80, &H80, &H80))
    richTextBoxAdv.OverridesDocumentBackground = True

    Padding

    Gets or sets the padding inside the SfRichTextBoxAdv control.

    Declaration
    public Thickness Padding { get; set; }
    Property Value
    Type Description
    System.Windows.Thickness

    The amount of space between the content of SfRichTextBoxAdv control and its Margin or Border. The default is a Thickness with values of 0 on all four sides.

    Examples

    The following code example demonstrates how to define padding for the SfRichTextBoxAdv control.

    <!-- Defines the padding for SfRichTextBoxAdv control. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" Padding="4 2 4 2"/>
    // Defines the padding for SfRichTextBoxAdv control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.Padding = new Thickness(4, 2, 4, 2);
    ' Defines the padding for SfRichTextBoxAdv control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.Padding = new Thickness(4, 2, 4, 2)

    PageCount

    Gets the total number of pages in the SfRichTextBoxAdv control.

    Declaration
    public int PageCount { get; }
    Property Value
    Type Description
    System.Int32

    Returns the total number of pages, if the SfRichTextBoxAdv control is loaded. Otherwise returns zero.

    PageDownKeyCommand

    Represents the PageDownKey command, which requests to perform PageDown shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand PageDownKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    PageFitCommand

    Represents the PageFit command, which requests that the Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.PageFitType in a SfRichTextBoxAdv control be changed.

    Declaration
    public static RoutedUICommand PageFitCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    PageUpKeyCommand

    Represents the PageUpKey command, which requests to perform PageUp shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand PageUpKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ParagraphCount

    Gets the total number of paragraphs in the document.

    Declaration
    public int ParagraphCount { get; }
    Property Value
    Type Description
    System.Int32

    Returns the total number of words in the document. Default value is 0.

    Examples

    The following code example demonstrates how to get paragraphs count SfRichTextBoxAdv control.

    // Defines the SfRichTextBoxAdv control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    int paragraphCount = richTextBoxAdv.ParagraphCount;
    ' Defines the SfRichTextBoxAdv control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    Dim paragraphCount As Integer = richTextBoxAdv.ParagraphCount

    PasteCommand

    Represents the Paste command, which requests that the clipboard contents be pasted in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand PasteCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    PreviousCommentCommand

    Represents the PreviousComment command, which requests navigation to any previous comment in the document.

    Declaration
    public static RoutedUICommand PreviousCommentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    PrintDocumentCommand

    Represents the PrintDocument command, which requests to print the document in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand PrintDocumentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    RedoCommand

    Represents the Redo command, which requests that the last undone operation in a SfRichTextBoxAdv control be redone.

    Declaration
    public static RoutedUICommand RedoCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    RemoveHyperlinkCommand

    Represents the RemoveHyperlink command, which requests that any hyperlink at the current position be removed.

    Declaration
    public static RoutedUICommand RemoveHyperlinkCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    RightIndentCommand

    Represents the RightIndent command, which requests to apply right indent for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand RightIndentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    RightKeyCommand

    Represents the RightKey command, which requests to perform Right shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand RightKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SaveAsDocumentCommand

    Represents the SaveAs document command, which requests to save the document in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand SaveAsDocumentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SaveDocumentCommand

    Represents the SaveDocument command, which requests to save the document in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand SaveDocumentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SelectAllCommand

    Represents the SelectAll command, which requests that the entire document in a SfRichTextBoxAdv control be selected.

    Declaration
    public static RoutedUICommand SelectAllCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SelectCellCommand

    Identifies the SelectCell command.

    Declaration
    public static RoutedUICommand SelectCellCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SelectColumnCommand

    Identifies the SelectRow command.

    Declaration
    public static RoutedUICommand SelectColumnCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    Selection

    Gets the SelectionAdv of the SfRichTextBoxAdv.

    Declaration
    public SelectionAdv Selection { get; }
    Property Value
    Type Description
    SelectionAdv

    The instance of SelectionAdv.

    See Also
    SelectionAdv

    SelectionBrush

    Gets or sets a brush that describes the selection in the SfRichTextBoxAdv control.

    Declaration
    public Brush SelectionBrush { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The brush that paints the selection in the SfRichTextBoxAdv control. The default value is a SolidColorBrush with color of #FF808080.

    Examples

    The following code example demonstrates how to define the selection brush for SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with selection brush as Blue. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" SelectionBrush="#FF0000FF"/>
    // Defines the SfRichTextBoxAdv control with selection brush as Blue.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.SelectionBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0xFF));
    ' Defines the SfRichTextBoxAdv control with selection brush as Blue.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.SelectionBrush = New SolidColorBrush(Color.FromArgb(&HFF, &H0, &H0, &HFF))

    SelectRowCommand

    Identifies the SelectColumn command.

    Declaration
    public static RoutedUICommand SelectRowCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SelectTableCommand

    Identifies the SelectTable command.

    Declaration
    public static RoutedUICommand SelectTableCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftDownKeyCommand

    Represents the ShiftDownKey command, which requests to perform Shift + Down shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftDownKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftEndKeyCommand

    Represents the ShiftEndKey command, which requests to perform Shift + End shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftEndKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftEnterKeyCommand

    Represents the ShiftEnterKey command, which requests to perform Shift + Enter shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftEnterKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftHomeKeyCommand

    Represents the ShiftHomeKey command, which requests to perform Shift + Home shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftHomeKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftLeftKeyCommand

    Represents the ShiftLeftKey command, which requests to perform Shift + Left shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftLeftKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftRightKeyCommand

    Represents the ShiftRightKey command, which requests to perform Shift + Right shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftRightKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftTabKeyCommand

    Represents the ShiftTabKey command, which requests to perform Shift + Tab shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftTabKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShiftUpKeyCommand

    Represents the ShiftUpKey command, which requests to perform Shift + Up shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShiftUpKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowBordersAndShadingDialogCommand

    Identifies the show borders and shading dialog command.

    Declaration
    public static RoutedUICommand ShowBordersAndShadingDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowCellOptionsDialogCommand

    Identifies the show cell options dialog command.

    Declaration
    public static RoutedUICommand ShowCellOptionsDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowCommentsCommand

    Represents the ShowComments command, which requests to show the comments in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowCommentsCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowEncryptDocumentDialogCommand

    Represents the ShowEncryptDocumentDialog command, which requests to show the encrypt document dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowEncryptDocumentDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowFindAndReplaceDialogCommand

    Represents the ShowFindAndReplaceDialog command, which requests to show the find and replace dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowFindAndReplaceDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowFontDialogCommand

    Represents the ShowFontDialog command, which requests to show the font dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowFontDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowHyperlinkDialogCommand

    Represents the ShowHyperlinkDialog command, which requests to show the hyperlink dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowHyperlinkDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowInsertTableDialogCommand

    Represents the ShowInsertTableDialog command, which requests to show the insert table dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowInsertTableDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowListDialogCommand

    Represents the ShowListDialog command, which requests to show the list dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowListDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowOptionsPaneCommand

    Represents the ShowOptionsPane command, which requests to show the options pane in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowOptionsPaneCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowParagraphDialogCommand

    Represents the ShowParagraphDialog command, which requests to show the paragraph dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowParagraphDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowSpellingPaneCommand

    Represents the ShowSpellingPane command, which requests to show the spelling pane in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowSpellingPaneCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowStyleDialogCommand

    Represents the ShowStyleDialogCommand command, which requests to show the Styles dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowStyleDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowStylesDialogCommand

    Represents the ShowStyleDialogCommand command, which requests to show the Styles dialog in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ShowStylesDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowTableDialogCommand

    Identifies the show table dialog command.

    Declaration
    public static RoutedUICommand ShowTableDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ShowTableOptionsDialogCommand

    Identifies the show table options dialog command.

    Declaration
    public static RoutedUICommand ShowTableOptionsDialogCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SpaceKeyCommand

    Represents the SpaceKey command, which requests to perform Space shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand SpaceKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SpellChecker

    Gets or Sets a spelling checker for the SfRichTextBoxAdv.

    Declaration
    public SpellChecker SpellChecker { get; set; }
    Property Value
    Type Description
    SpellChecker

    The spelling checker for the SfRichTextBoxAdv.

    Examples

    The following code example demonstrates how to enable spell checking functionality in a SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" xmlns:System="clr-namespace:System;assembly=mscorlib" 
                                        xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf">
        <RichTextBoxAdv:SfRichTextBoxAdv.SpellChecker>
            <!-- Enables spell checking functionality. -->
            <RichTextBoxAdv:SpellChecker IsEnabled="True" IgnoreAlphaNumericWords="True" IgnoreURIs="True" IgnoreUppercaseWords="False">
                <RichTextBoxAdv:SpellChecker.CustomDictionaries>
                    <!-- Defines the custom dictionaries for spell checking. -->
                    <System:String>../../Assets/Default.dic</System:String>
                </RichTextBoxAdv:SpellChecker.CustomDictionaries>
            </RichTextBoxAdv:SpellChecker>
        </RichTextBoxAdv:SfRichTextBoxAdv.SpellChecker>
    </RichTextBoxAdv:SfRichTextBoxAdv>
    // Defines the control.
    Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv richTextBoxAdv = new Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv();
    

    // Enables the spell checking functionality. SpellChecker spellChecker = new SpellChecker(); spellChecker.IsEnabled = true; spellChecker.IgnoreAlphaNumericWords = true; spellChecker.IgnoreURIs = true; spellChecker.IgnoreUppercaseWords = false; // Defines the custom dictionaries for spell checking. spellChecker.CustomDictionaries.Add("../../Assets/Default.dic");

    richTextBoxAdv.SpellChecker = spellChecker;

    ' Defines the control.
    Dim richTextBoxAdv As New Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv()
    
    ' Enables the spell checking functionality.
    Dim spellChecker As New SpellChecker()
    spellChecker.IsEnabled = True
    spellChecker.IgnoreAlphaNumericWords = True
    spellChecker.IgnoreURIs = True
    spellChecker.IgnoreUppercaseWords = False
    ' Defines the custom dictionaries for spell checking.
    spellChecker.CustomDictionaries.Add("../../Assets/Default.dic")
    
    richTextBoxAdv.SpellChecker = spellChecker

    StrikeThroughCommand

    Represents the StrikeThrough command, which requests to apply StrikeThrough for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand StrikeThroughCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    SuggestionSettings

    Declaration
    public SuggestionSettings SuggestionSettings { get; set; }
    Property Value
    Type
    SuggestionSettings

    TabKeyCommand

    Represents the TabKey command, which requests to perform Tab shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand TabKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    TableAlignmentCommand

    Identifies the TableAlignment command.

    Declaration
    public static RoutedUICommand TableAlignmentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    TableLeftIndentCommand

    Identifies the TableLeftIndent command.

    Declaration
    public static RoutedUICommand TableLeftIndentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    TextAlignmentCommand

    Represents the TextAlignment command, which requests to apply System.Windows.TextAlignment for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand TextAlignmentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    TextWrapping

    Gets or Sets the TextWrapping of the SfRichTextBoxAdv control.

    Declaration
    public TextWrapping TextWrapping { get; set; }
    Property Value
    Type Description
    TextWrapping

    The TextWrapping of the SfRichTextBoxAdv control.

    Remarks

    The default is TextWrapping.Wrap.

    Examples

    The following code example demonstrates how to shows Text Wrapping with NoWrap SfRichTextBoxAdv control with Flow Layout

    <!-- Defines the SfRichTextBoxAdv control with text wrapping style as none. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Continuous" TextWrapping="NoWrap"/>
    // Defines the SfRichTextBoxAdv control with text wrapping style as none..
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.LayoutType = LayoutType.Continuous;
    richTextBoxAdv.TextWrapping = TextWrapping.NoWrap;
    ' Defines the SfRichTextBoxAdv control with text wrapping style as none..
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.LayoutType = LayoutType.Continuous
    richTextBoxAdv.TextWrapping = TextWrapping.NoWrap
    See Also
    TextWrapping

    ToggleBaselineAlignmentCommand

    Represents the Toggle Baseline Alignment command, which requests to toggle BaselineAlignment for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ToggleBaselineAlignmentCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ToggleBeforeSpacingCommand

    Represents the ToggleBeforeSpacing command, which requests to toggle before spacing for the selected paragraphs in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ToggleBeforeSpacingCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ToggleHighlightColorCommand

    Represents the ToggleHighlightColor command, which requests to toggle HighlightColor for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ToggleHighlightColorCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    ToggleUnderlineCommand

    Represents the ToggleUnderline command, which requests to toggle Underline for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand ToggleUnderlineCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    UnderlineCommand

    Represents the Underline command, which requests to apply Underline for the selected contents in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand UnderlineCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    UndoCommand

    Represents the Undo command, which requests that the last edit operation in a SfRichTextBoxAdv control be undone.

    Declaration
    public static RoutedUICommand UndoCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    UpKeyCommand

    Represents the UpKey command, which requests to perform Up shortcut operation in a SfRichTextBoxAdv control.

    Declaration
    public static RoutedUICommand UpKeyCommand { get; }
    Property Value
    Type
    System.Windows.Input.RoutedUICommand

    UseCtrlClickToFollowHyperlink

    Gets or sets a value that indicates whether the SfRichTextBoxAdv control requires holding CTRL key to enable hyperlink navigation on mouse click.

    Declaration
    public bool UseCtrlClickToFollowHyperlink { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if CTRL key must be hold to enable hyperlink navigation on mouse click. False if mouse click is enough to enable hyperlink navigation without need for holding CTRL key. The default value is true.

    Examples

    The following code example demonstrates how to specify the SfRichTextBoxAdv control to enable hyperlink navigation on mouse click without need for holding CTRL key.

    <!-- Defines the SfRichTextBoxAdv control that enables hyperlink navigation on mouse click without need for holding CTRL key. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" UseCtrlClickToFollowHyperlink​​​="False"/>
    // Defines the SfRichTextBoxAdv control that enables hyperlink navigation on mouse click without need for holding CTRL key.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.UseCtrlClickToFollowHyperlink​​​ = false;
    ' Defines the SfRichTextBoxAdv control that enables hyperlink navigation on mouse click without need for holding CTRL key.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.UseCtrlClickToFollowHyperlink​​​ = False

    UseLightWeightDom

    Gets or sets a Boolean value indicating whether to use lightweight DOM or not. The default value is false.

    Declaration
    public static bool UseLightWeightDom { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if SfRichTextBoxAdv control uses lightweight DOM; otherwise, false

    Remarks

    If this property is true, then all the formatting values will be removed from DependencyProperty and maintained internally in a memory optimized way to reduce main memory usage of DOM. This helps for loading large contents in SfRichTextBoxAdv control. Otherwise, all the formatting values are maintained in DependencyProperty and may increase the main memory usage of DOM.

    Examples

    The following code example demonstrates how to specify SfRichTextBoxAdv control to use lightweight DOM.

    SfRichTextBoxAdv.UseLightWeightDom = true;
    SfRichTextBoxAdv.UseLightWeightDom = True

    VerticalScrollBar

    Gets the Vertical ScrollBar of the SfRichTextBoxAdv.

    Declaration
    public ScrollBar VerticalScrollBar { get; }
    Property Value
    Type
    System.Windows.Controls.Primitives.ScrollBar

    VerticalScrollBarVisibility

    Gets or sets a value that indicates whether the vertical scroll bar of the SfRichTextBoxAdv control needs to be visible.

    Declaration
    public bool VerticalScrollBarVisibility { get; set; }
    Property Value
    Type Description
    System.Boolean

    The vertical scroll bar of the SfRichTextBoxAdv control needs to be visible or not.

    Examples

    The following code example demonstrates how to enable or disable vertical scroll bar visibility in SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with vertical scroll bar visibility disabled. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" VerticalScrollBarVisibility="False"/>
    // Defines the SfRichTextBoxAdv control with vertical scroll bar visibility disabled.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.VerticalScrollBarVisibility = false;
    ' Defines the SfRichTextBoxAdv control with vertical scroll bar visibility disabled.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.VerticalScrollBarVisibility = False

    WordCount

    Gets the total number of words in the document.

    Declaration
    public int WordCount { get; }
    Property Value
    Type Description
    System.Int32

    Returns the total number of words in the document. Default value is 0.

    Examples

    The following code example demonstrates how to get words count SfRichTextBoxAdv control.

    // Defines the SfRichTextBoxAdv control.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    int wordCount = richTextBoxAdv.WordCount;
    ' Defines the SfRichTextBoxAdv control.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    Dim wordCount As Integer = richTextBoxAdv.WordCount

    ZoomFactor

    Gets or Sets the zoom factor of SfRichTextBoxAdv control.

    Declaration
    public double ZoomFactor { get; set; }
    Property Value
    Type Description
    System.Double

    The zoom factor of SfRichTextBoxAdv control.

    Remarks

    The value should be represented in percentage [between 10 to 500].

    Examples

    The following code example demonstrates how to define zoom factor for the SfRichTextBoxAdv control.

    <!-- Defines the SfRichTextBoxAdv control with zoom factor as 200%. --> 
    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" ZoomFactor="200"/>
    // Defines the SfRichTextBoxAdv control with zoom factor as 200%.
    SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
    richTextBoxAdv.ZoomFactor = 200;
    ' Defines the SfRichTextBoxAdv control with zoom factor as 200%.
    Dim richTextBoxAdv As New SfRichTextBoxAdv()
    richTextBoxAdv.ZoomFactor = 200

    Methods

    ArrangeOverride(Size)

    Provides the behavior for the Arrange pass of layout. Classes can override this method to define their own Arrange pass behavior.

    Declaration
    protected override Size ArrangeOverride(Size finalSize)
    Parameters
    Type Name Description
    System.Windows.Size finalSize

    The final area within the parent that this object should use to arrange itself and its children.

    Returns
    Type Description
    System.Windows.Size

    The actual size that is used after the element is arranged in layout.

    Dispose()

    Releases all resources used by the SfRichTextBoxAdv instance.

    Declaration
    public void Dispose()
    Examples

    The following code example demonstrates how to dispose an instance of SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void OnUnloaded()
    {
        if (richTextBoxAdv != null)
            richTextBoxAdv.Dispose();
    }
    Public Sub OnUnloaded()
        If richTextBoxAdv IsNot Nothing Then
            richTextBoxAdv.Dispose()
        End If
    End Sub

    Find(String, FindOptions)

    Finds the first occurrence of the specified System.String in the SfRichTextBoxAdv from current selection with specified FindOptions.

    Declaration
    public TextSearchResult Find(string text, FindOptions findOption)
    Parameters
    Type Name Description
    System.String text

    The text to find.

    FindOptions findOption

    The FindOptions to match.

    Returns
    Type Description
    TextSearchResult

    Returns the TextSearchResult instance, if any matching text with the specified is found. Otherwise returns null.

    Examples

    The following code example demonstrates how to find first occurrence of the specified text in the SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void FindText()
    {
        // Finds for the specified text by matching case sensitive whole word.
        TextSearchResult textSearchResult = richTextBoxAdv.Find("Section", FindOptions.CaseSensitiveWholeWord);
    
    if(textSearchResult != null)
    {
        // If the text search result is found, select the result.
        richTextBoxAdv.Selection.Select(textSearchResult.Start, textSearchResult.End);
    
        // Applies bold formatting for the text.
        richTextBoxAdv.Selection.CharacterFormat.Bold = true;
    }
    

    }

    Public Sub FindText()
         ' Finds for the specified text by matching case sensitive whole word.
         Dim textSearchResult As TextSearchResult = richTextBoxAdv.Find("Section", FindOptions.CaseSensitiveWholeWord)
    
         If textSearchResult IsNot Nothing Then
             ' If the text search result is found, select the result.
             richTextBoxAdv.Selection.SelectionRanges.Add(textSearchResult.Start, textSearchResult.[End])
    
             ' Applies bold formatting for the text.
             richTextBoxAdv.Selection.CharacterFormat.Bold = True
         End If
     End Sub
    See Also
    FindOptions

    Find(Regex, FindOptions)

    Finds the first occurrence of the specified System.Text.RegularExpressions.Regex pattern in the SfRichTextBoxAdv from current selection with specified FindOptions.

    Declaration
    public TextSearchResult Find(Regex pattern, FindOptions findOption)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern

    The System.Text.RegularExpressions.Regex pattern to find.

    FindOptions findOption

    The FindOptions to match.

    Returns
    Type Description
    TextSearchResult

    Returns the TextSearchResult instance, if any matching System.Text.RegularExpressions.Regex pattern with the specified is found. Otherwise returns null.

    Examples

    The following code example demonstrates how to find first occurrence of the specified pattern in the SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void FindPattern()
    {
        // Finds for the specified pattern (lines starting with Section followed by space).
        TextSearchResult textSearchResult = richTextBoxAdv.Find(new Regex("^Section\\s"), FindOptions.None);
    
    if(textSearchResult != null)
    {
        // If the text search result is found, select the result.
        richTextBoxAdv.Selection.Select(textSearchResult.Start, textSearchResult.End);
    
        // Applies bold formatting for the text.
        richTextBoxAdv.Selection.CharacterFormat.Bold = true;
    }
    

    }

    Public Sub FindPattern()
         ' Finds for the specified pattern (lines starting with Section followed by space).
         Dim textSearchResults As TextSearchResults = richTextBoxAdv.FindAll(New Regex("^Section\s"), FindOptions.None)
    
         If textSearchResult IsNot Nothing Then
             ' If the text search result is found, select the result.
             richTextBoxAdv.Selection.SelectionRanges.Add(textSearchResult.Start, textSearchResult.[End])
    
             ' Applies bold formatting for the text.
             richTextBoxAdv.Selection.CharacterFormat.Bold = True
         End If
     End Sub
    See Also
    System.Text.RegularExpressions.Regex
    FindOptions

    FindAll(String, FindOptions)

    Finds all the occurrences of the specified System.String in the SfRichTextBoxAdv with specified FindOptions.

    Declaration
    public TextSearchResults FindAll(string text, FindOptions findOption)
    Parameters
    Type Name Description
    System.String text

    The text to find.

    FindOptions findOption

    The FindOptions to match.

    Returns
    Type Description
    TextSearchResults

    Returns the Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.TextSearchResults instance, if any matching text with the specified is found. Otherwise returns null.

    Examples

    The following code example demonstrates how to find all occurrences of the specified text in the SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void FindAllText()
    {
        // Finds for the specified text by matching case sensitive whole word.
        TextSearchResults textSearchResults = richTextBoxAdv.FindAll("Section", FindOptions.CaseSensitiveWholeWord);
    
    if(textSearchResults != null)
    {
       // If the text search results are found, select all the results.
       for (int i = 0; i &lt; textSearchResults.Count; i++)
       {
           TextSearchResult textSearchResult = textSearchResults[i];
           if (i == 0)
               richTextBoxAdv.Selection.Select(textSearchResult.Start, textSearchResult.End);
           else
               richTextBoxAdv.Selection.SelectionRanges.Add(textSearchResult.Start, textSearchResult.End);
       }
    
       // Applies highlight color for the text.
       richTextBoxAdv.Selection.CharacterFormat.HighlightColor = HighlightColor.Yellow;
    }
    

    }

    Public Sub FindAllText()
         ' Finds for the specified text by matching case sensitive whole word.
         Dim textSearchResults As TextSearchResults = richTextBoxAdv.FindAll("Section", FindOptions.CaseSensitiveWholeWord)
    
         If textSearchResults IsNot Nothing Then
             ' If the text search result is found, select all the results.
             For i As Integer = 0 To textSearchResults.Count - 1
                 Dim textSearchResult As TextSearchResult = textSearchResults(i)
                 If i = 0 Then
                     richTextBoxAdv.Selection.[Select](textSearchResult.Start, textSearchResult.[End])
                 Else
                     richTextBoxAdv.Selection.SelectionRanges.Add(textSearchResult.Start, textSearchResult.[End])
                 End If
             Next
    
             ' Applies highlight color for the text.
             richTextBoxAdv.Selection.CharacterFormat.HighlightColor = HighlightColor.Yellow
         End If
     End Sub
    See Also
    FindOptions

    FindAll(Regex, FindOptions)

    Finds all the occurrences of specified System.Text.RegularExpressions.Regex pattern in the SfRichTextBoxAdv with specified FindOptions.

    Declaration
    public TextSearchResults FindAll(Regex pattern, FindOptions findOption)
    Parameters
    Type Name Description
    System.Text.RegularExpressions.Regex pattern

    The System.Text.RegularExpressions.Regex pattern to find.

    FindOptions findOption

    The FindOptions to match.

    Returns
    Type Description
    TextSearchResults

    Returns the Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.TextSearchResults instance, if any specified System.Text.RegularExpressions.Regex pattern is matched with the specified . Otherwise returns null.

    Examples

    The following code example demonstrates how to find all occurrences of the specified pattern in the SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void FindAllPattern()
    {
        // Finds for the specified pattern (lines starting with Section followed by space).
        TextSearchResults textSearchResults = richTextBoxAdv.FindAll(new Regex("^Section\\s"), FindOptions.None);
    
    if(textSearchResults != null)
    {
       // If the text search results are found, select all the results.
       for (int i = 0; i &lt; textSearchResults.Count; i++)
       {
           TextSearchResult textSearchResult = textSearchResults[i];
           if (i == 0)
               richTextBoxAdv.Selection.Select(textSearchResult.Start, textSearchResult.End);
           else
               richTextBoxAdv.Selection.SelectionRanges.Add(textSearchResult.Start, textSearchResult.End);
       }
    
       // Applies highlight color for the text.
       richTextBoxAdv.Selection.CharacterFormat.HighlightColor = HighlightColor.Yellow;
    }
    

    }

    Public Sub FindAllPattern()
         ' Finds for the specified pattern (lines starting with Section followed by space).
         Dim textSearchResults As TextSearchResults = richTextBoxAdv.FindAll(New Regex("^Section\s"), FindOptions.None)
    
         If textSearchResults IsNot Nothing Then
             ' If the text search result is found, select all the results.
             For i As Integer = 0 To textSearchResults.Count - 1
                 Dim textSearchResult As TextSearchResult = textSearchResults(i)
                 If i = 0 Then
                     richTextBoxAdv.Selection.[Select](textSearchResult.Start, textSearchResult.[End])
                 Else
                     richTextBoxAdv.Selection.SelectionRanges.Add(textSearchResult.Start, textSearchResult.[End])
                 End If
             Next
    
             ' Applies highlight color for the text.
             richTextBoxAdv.Selection.CharacterFormat.HighlightColor = HighlightColor.Yellow
         End If
     End Sub
    See Also
    System.Text.RegularExpressions.Regex
    FindOptions

    GetSpellingError(TextPosition)

    Returns a SpellingError instance associated with any spelling error at the specified TextPosition in the document.

    Declaration
    public SpellingError GetSpellingError(TextPosition textPosition)
    Parameters
    Type Name Description
    TextPosition textPosition

    The TextPosition instance at which spelling error to be checked.

    Returns
    Type Description
    SpellingError

    A SpellingError instance containing the details of the spelling error found at the TextPosition, or null if no spelling error exists at the specified TextPosition.

    Examples

    The following code example demonstrates how to get the spelling error at the specified text position in a SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" xmlns:System="clr-namespace:System;assembly=mscorlib" 
                                        xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.Wpf">
        <RichTextBoxAdv:SfRichTextBoxAdv.SpellChecker>
            <!-- Enables spell checking functionality. -->
            <RichTextBoxAdv:SpellChecker IsEnabled="True" IgnoreAlphaNumericWords="True" IgnoreURIs="True" IgnoreUppercaseWords="False">
                <RichTextBoxAdv:SpellChecker.CustomDictionaries>
                    <!-- Defines the custom dictionaries for spell checking. -->
                    <System:String>../../Assets/Default.dic</System:String>
                </RichTextBoxAdv:SpellChecker.CustomDictionaries>
            </RichTextBoxAdv:SpellChecker>
        </RichTextBoxAdv:SfRichTextBoxAdv.SpellChecker>
    </RichTextBoxAdv:SfRichTextBoxAdv>
    public void IgnoreSpellingError()
    {
        TextPosition textPosition = richTextBoxAdv.Document.GetTextPosition("0;0;20");
        // Gets the spelling error at the specified text position.
        Syncfusion.Windows.Controls.RichTextBoxAdv.SpellingError spellingError = richTextBoxAdv.GetSpellingError(textPosition);
        if (spellingError != null)
            // If a spelling error is found, ignores all the occurrences of the misspelled word.
            spellingError.IgnoreAll();
    }
    Public Sub IgnoreSpellingError()
        Dim textPosition As TextPosition = richTextBoxAdv.Document.GetTextPosition("0;0;20")
        ' Gets the spelling error at the specified text position.
        Dim spellingError As Syncfusion.Windows.Controls.RichTextBoxAdv.SpellingError = richTextBoxAdv.GetSpellingError(textPosition)
        If spellingError IsNot Nothing Then
            ' If a spelling error is found, ignores all the occurrences of the misspelled word.
            spellingError.IgnoreAll()
        End If
    End Sub

    Load(WordDocument)

    Imports the specified WordDocument into the SfRichTextBoxAdv control.

    Declaration
    public void Load(WordDocument wordDocument)
    Parameters
    Type Name Description
    WordDocument wordDocument

    Word document.

    Exceptions
    Type Condition
    System.ArgumentNullException

    document cannot be null.

    Load(Stream, FormatType)

    Imports the specified System.IO.Stream in the specified FormatType into the SfRichTextBoxAdv control.

    Declaration
    public void Load(Stream stream, FormatType formatType)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to import contents.

    FormatType formatType

    The FormatType to import.

    Examples

    The following code example demonstrates how to load a stream into the SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void LoadStream()
    {
        // Raw content.
        string content = "

    Hello world

    "; // Converts the string into byte array. byte[] bytes = Encoding.UTF8.GetBytes(content); // Initializes the stream. Stream stream = new MemoryStream(); // Serializes the bytes into the stream. stream.Write(bytes, 0, bytes.Length); // Seeks the stream to starting position. stream.Position = 0;
    // Loads the stream into SfRichTextBoxAdv in HTML format.
    richTextBoxAdv.Load(stream, FormatType.Html);
    

    }

    Public Sub LoadStream()
    
        ' Raw content.
        Dim content As String = "

    Hello world

    " ' Converts the string into byte array. Dim bytes As Byte() = Encoding.UTF8.GetBytes(content) ' Initializes the stream. Dim stream As Stream = New MemoryStream() ' Serializes the bytes into the stream. stream.Write(bytes, 0, bytes.Length); ' Seeks the stream to starting position. stream.Position = 0 ' Loads the stream into SfRichTextBoxAdv in HTML format. richTextBoxAdv.Load(stream, FormatType.Html) End Sub
    Exceptions
    Type Condition
    System.NotSupportedException

    RichTextBoxAdv does not support this file format.

    System.ArgumentNullException

    Stream cannot be null.

    See Also
    FormatType

    Load(String)

    Imports the specified file into the SfRichTextBoxAdv control.

    Declaration
    public void Load(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file along with its path and extension.

    Examples

    The following code example demonstrates how to import the file into the SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void LoadFile()
    {
        // Imports the content from the file at the specified path as Docx Format.
        richTextBoxAdv.Load("D:/Sample.docx");
    }
    Public Sub LoadFile()
        ' Imports the content from the file at the specified path as Docx Format.
        richTextBoxAdv.Load("D:/Sample.docx")
    End Sub
    Exceptions
    Type Condition
    System.ArgumentNullException

    File name cannot be null.

    LoadAsync(WordDocument, CancellationToken)

    Asynchronously imports the specified WordDocument into the SfRichTextBoxAdv control.

    Declaration
    public Task<bool> LoadAsync(WordDocument wordDocument, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    WordDocument wordDocument

    The WordDocument

    System.Threading.CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous load operation.

    Exceptions
    Type Condition
    System.ArgumentNullException

    document cannot be null.

    LoadAsync(Stream, FormatType)

    Asynchronously imports the specified System.IO.Stream in the specified FormatType into the SfRichTextBoxAdv control.

    Declaration
    public Task<bool> LoadAsync(Stream stream, FormatType formatType)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to import the content.

    FormatType formatType

    The FormatType to import.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous load operation.

    Examples

    The following code example demonstrates how to asynchronously load System.IO.Stream.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public async Task<bool> LoadStreamAsync()
    {
        TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();
    
    // Raw content.
    string content = &quot;&lt;html>&lt;body>&lt;p>Hello world&lt;/p>&lt;/body>&lt;/html>&quot;;
    // Converts the string into byte array.
    byte[] bytes = Encoding.UTF8.GetBytes(content);
    // Initializes the stream.
    Stream stream = new MemoryStream();
    // Serializes the bytes into the stream.
    stream.Write(bytes, 0, bytes.Length);
    // Seeks the stream to starting position.
    stream.Position = 0;
    
    // Loads the stream asynchronously into SfRichTextBoxAdv in HTML format.
    await richTextBoxAdv.LoadAsync(stream, FormatType.Html);
    
    tcs.SetResult(true);
    return await tcs.Task;
    

    }

    Public Async Function LoadStreamAsync() As Task(Of Boolean)
    
        Dim tcs As TaskCompletionSource(Of Boolean) = New TaskCompletionSource(Of Boolean)
    
        ' Raw content.
        Dim content As String = "<html><body><p>Hello world</p></body></html>"
        ' Converts the string into byte array.
        Dim bytes As Byte() = Encoding.UTF8.GetBytes(content)
        ' Initializes the stream.
        Dim stream As Stream = New MemoryStream()
        ' Serializes the bytes into the stream.
        stream.Write(bytes, 0, bytes.Length);
        ' Seeks the stream to starting position.
        stream.Position = 0
    
        ' Loads the stream asynchronously into SfRichTextBoxAdv in HTML format.
        Await richTextBoxAdv.LoadAsync(stream, FormatType.Html)
    
        tcs.SetResult(True)
        Return Await tcs.Task
    End Function
    Exceptions
    Type Condition
    System.NotSupportedException

    RichTextBoxAdv does not support this file format.

    System.ArgumentNullException

    Stream cannot be null.

    LoadAsync(Stream, FormatType, CancellationToken)

    Asynchronously imports the specified System.IO.Stream in the specified FormatType into the SfRichTextBoxAdv.

    Declaration
    public Task<bool> LoadAsync(Stream stream, FormatType formatType, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to import the content.

    FormatType formatType

    The FormatType to import.

    System.Threading.CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous load operation.

    Examples

    The following code example demonstrates how to asynchronously load a stream into the SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    Task<bool> loadAsync = null;
    

    public async Task<bool> LoadStreamAsync() { TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();

    // Raw content.
    string content = &quot;&lt;html>&lt;body>&lt;p>Hello world&lt;/p>&lt;/body>&lt;/html>&quot;;
    // Converts the string into byte array.
    byte[] bytes = Encoding.UTF8.GetBytes(content);
    // Initializes the stream.
    Stream stream = new MemoryStream();
    // Serializes the bytes into the stream.
    stream.Write(bytes, 0, bytes.Length);
    // Seeks the stream to starting position.
    stream.Position = 0;
    
    CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
    // Loads the stream asynchronously into SfRichTextBoxAdv in HTML format.
    loadAsync = richTextBoxAdv.LoadAsync(stream, FormatType.Html, cancellationTokenSource.Token);
    
    await loadAsync;
    
    if (cancellationTokenSource != null)
        cancellationTokenSource.Dispose();
    cancellationTokenSource = null;
    loadAsync = null;
    
    tcs.SetResult(true);
    return await tcs.Task;
    

    }

    Dim loadAsync As Task(Of Boolean) = Nothing
    
    Public Async Function LoadStreamAsync() As Task(Of Boolean)
    
        Dim tcs As TaskCompletionSource(Of Boolean) = New TaskCompletionSource(Of Boolean)
    
        ' Raw content.
        Dim content As String = "<html><body><p>Hello world</p></body></html>"
        ' Converts the string into byte array.
        Dim bytes As Byte() = Encoding.UTF8.GetBytes(content)
        ' Initializes the stream.
        Dim stream As Stream = New MemoryStream()
        ' Serializes the bytes into the stream.
        stream.Write(bytes, 0, bytes.Length);
        ' Seeks the stream to starting position.
        stream.Position = 0
    
        Dim cancellationTokenSource As CancellationTokenSource = New CancellationTokenSource()
    
        ' Loads the stream asynchronously into SfRichTextBoxAdv in HTML format.
        loadAsync = richTextBoxAdv.LoadAsync(stream, FormatType.Html, cancellationTokenSource.Token)
    
        Await loadAsync
        If cancellationTokenSource IsNot Nothing Then
            cancellationTokenSource.Dispose()
        End If
        cancellationTokenSource = Nothing
        loadAsync = Nothing
    
        tcs.SetResult(True)
        Return Await tcs.Task
    End Function
    Exceptions
    Type Condition
    System.NotSupportedException

    RichTextBoxAdv does not support this file format.

    System.ArgumentNullException

    Stream cannot be null.

    See Also
    FormatType

    LoadAsync(String)

    Asynchronously imports the specified file into the SfRichTextBoxAdv control.

    Declaration
    public Task<bool> LoadAsync(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file along with its path and extension.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous load operation.

    Examples

    The following code example demonstrates how to asynchronously import the file into the SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public async void LoadFile()
    {
        // Imports the content from the file at the specified path as Docx Format asynchronously.
        await richTextBoxAdv.LoadAsync("D:/Sample.docx");
    }
    Public Async Function LoadFile() As Task
        ' Imports the content from the file at the specified path as Docx Format asynchronously.
        Await richTextBoxAdv.LoadAsync("D:/Sample.docx")
    End Function
    Exceptions
    Type Condition
    System.ArgumentNullException

    File name cannot be null.

    LoadAsync(String, CancellationToken)

    Asynchronously imports the specified file into the SfRichTextBoxAdv control.

    Declaration
    public Task<bool> LoadAsync(string fileName, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file along with its path and extension.

    System.Threading.CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous load operation.

    Examples

    The following code example demonstrates how to asynchronously import the file into the SfRichTextBoxAdv control.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public async void LoadFile()
    {
         CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
        // Imports the content from the file at the specified path as Docx Format asynchronously.
        await richTextBoxAdv.LoadAsync("D:/Sample.docx", cancellationTokenSource.Token);
    }
    Public Async Function LoadFile() As Task
        CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
        ' Imports the content from the file at the specified path as Docx Format asynchronously.
        Await richTextBoxAdv.LoadAsync("D:/Sample.docx", cancellationTokenSource.Token)
    End Function
    Exceptions
    Type Condition
    System.ArgumentNullException

    File name cannot be null.

    MeasureOverride(Size)

    Provides the behavior for the Measure pass of the layout cycle. Classes can override this method to define their own Measure pass behavior.

    Declaration
    protected override Size MeasureOverride(Size availableSize)
    Parameters
    Type Name Description
    System.Windows.Size availableSize

    The available size that this object can give to child objects. Infinity can be specified as a value to indicate that the object will size to whatever content is available.

    Returns
    Type Description
    System.Windows.Size

    The size that this object determines it needs during layout, based on its calculations of the allocated sizes for child objects or based on other considerations such as a fixed container size.

    OnApplyTemplate()

    Applies the template

    Declaration
    public override void OnApplyTemplate()

    OnContextMenuClosing(ContextMenuEventArgs)

    Invoked whenever an unhandled System.Windows.FrameworkElement.ContextMenuClosing routed event reaches this class in its route. Implement this method to add class handling for this event.

    Declaration
    protected override void OnContextMenuClosing(ContextMenuEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Controls.ContextMenuEventArgs e

    Provides data about the event.

    OnContextMenuOpening(ContextMenuEventArgs)

    Invoked whenever an unhandled System.Windows.FrameworkElement.ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.

    Declaration
    protected override void OnContextMenuOpening(ContextMenuEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Controls.ContextMenuEventArgs e

    The System.Windows.RoutedEventArgs that contains the event data.

    OnDragEnter(DragEventArgs)

    Invoked when dragged object enters drop target boundary.

    Declaration
    protected override void OnDragEnter(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs e

    contains event data

    OnDragLeave(DragEventArgs)

    Invoked when dragged object leaves the drop target boundary.

    Declaration
    protected override void OnDragLeave(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs e

    contains event data

    OnDragOver(DragEventArgs)

    Invoked when dragged object continuosly dragged with in the drop target boundary.

    Declaration
    protected override void OnDragOver(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs e

    contains event data

    OnDrop(DragEventArgs)

    Invoked when dragged object gets dropped on drop target.

    Declaration
    protected override void OnDrop(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DragEventArgs e

    contains event data

    OnGotFocus(RoutedEventArgs)

    Called before the GotFocus event occurs.

    Declaration
    protected override void OnGotFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.RoutedEventArgs e

    The data for the event.

    OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)

    Called when got key board focus.

    Declaration
    protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyboardFocusChangedEventArgs e

    The System.Windows.Input.KeyboardFocusChangedEventArgs that contains the event data.

    OnKeyDown(KeyEventArgs)

    Called before the KeyDown event occurs.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    The data for the event.

    OnKeyUp(KeyEventArgs)

    Called before the KeyUp event occurs.

    Declaration
    protected override void OnKeyUp(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    The data for the event.

    OnLostFocus(RoutedEventArgs)

    Called before the LostFocus event occurs.

    Declaration
    protected override void OnLostFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.RoutedEventArgs e

    The data for the event.

    OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

    Called before the LostKeyboardFocus event occurs.

    Declaration
    protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyboardFocusChangedEventArgs e

    The System.Windows.Input.KeyboardFocusChangedEventArgs that contains event data

    OnMouseDown(MouseButtonEventArgs)

    Raised when mouse button (Down) is clicked.

    Declaration
    protected override void OnMouseDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    OnMouseLeave(MouseEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeave(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the mouse leave the control.

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

    OnMouseMove(MouseEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseEventArgs that contains the event data.

    OnMouseUp(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released.

    OnMouseWheel(MouseWheelEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseWheel attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseWheel(MouseWheelEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseWheelEventArgs e

    The System.Windows.Input.MouseWheelEventArgs that contains the event data.

    PrintDocument()

    Prints the SfRichTextBoxAdv document content.

    Declaration
    public void PrintDocument()
    Examples

    The following code example demonstrates how to print the content of SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void Print()
    {
        richTextBoxAdv.PrintDocument();
    }
    Public Sub Print()
        richTextBoxAdv.PrintDocument()
    End Sub

    ResetZooming()

    Resets the zooming to 100% in SfRichTextBoxAdv control.

    Declaration
    public void ResetZooming()
    Remarks

    If SfRichTextBoxAdv control is loaded, then the ZoomFactor property is set to 100.

    Examples

    The following code example demonstrates how to reset the zooming factor of SfRichTextBoxAdv.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void ResetZooming()
    {
        richTextBoxAdv.Dispose();
    }
    Public Sub ResetZooming()
        richTextBoxAdv.ResetZooming()
    End Sub

    Save(Stream, FormatType)

    Exports the SfRichTextBoxAdv content into the specified System.IO.Stream in specified FormatType.

    Declaration
    public void Save(Stream stream, FormatType formatType)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to export the content.

    FormatType formatType

    The FormatType to export.

    Examples

    The following code example demonstrates how to export the SfRichTextBoxAdv content into the stream.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void SaveStream()
    {
        // Initializes the stream.
        Stream stream = new MemoryStream();
    
    // Exports the content into the stream as Docx Format.
    richTextBoxAdv.Save(stream, FormatType.Docx);
    
    // Seek the stream to starting position.
    stream.Position = 0;
    
    // Process the stream here.
    

    }

    Public Sub SaveStream()
    
        ' Initializes the stream.
        Dim stream As Stream = New MemoryStream()
    
        ' Exports the content into the stream as Docx Format.
        richTextBoxAdv.Save(stream, FormatType.Docx)
    
        ' Seek the stream to starting position.
        stream.Position = 0
    
        ' Process the stream here.
    End Sub
    Exceptions
    Type Condition
    System.ArgumentNullException

    Stream cannot be null.

    Save(String)

    Exports the SfRichTextBoxAdv content into the specified file.

    Declaration
    public void Save(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file along with its path and extension.

    Examples

    The following code example demonstrates how to export the SfRichTextBoxAdv content into the file.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public void SaveFile()
    {
        // Exports the content into the file at the specified path as Docx Format.
        richTextBoxAdv.Save("D:/Sample.docx");
    }
    Public Sub SaveFile()
        ' Exports the content into the file at the specified path as Docx Format.
        richTextBoxAdv.Save("D:/Sample.docx")
    End Sub
    Exceptions
    Type Condition
    System.ArgumentNullException

    File name cannot be null.

    SaveAsync(Stream, FormatType)

    Asynchronously exports the SfRichTextBoxAdv document content as specified FormatType into the System.IO.Stream.

    Declaration
    public Task<bool> SaveAsync(Stream stream, FormatType formatType)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream to export the content.

    FormatType formatType

    The FormatType to export.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous save operation.

    Examples

    The following code example demonstrates how to asynchronously export the SfRichTextBoxAdv content into a stream.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public async void SaveStream()
    {
        // Initializes the stream.
        Stream stream = new MemoryStream();
    
    // Exports the content into the stream as Docx Format asynchronously.
    await richTextBoxAdv.SaveAsync(stream, FormatType.Docx);
    
    // Seek the stream to starting position.
    stream.Position = 0;
    
    // Process the stream here.
    

    }

    Public Async Function SaveStream() As Task
    
        ' Initializes the stream.
        Dim stream As Stream = New MemoryStream()
    
        ' Exports the content into the stream as Docx Format asynchronously.
        Await richTextBoxAdv.SaveAsync(stream, FormatType.Docx)
    
        ' Seek the stream to starting position.
        stream.Position = 0
    
        ' Process the stream here.
    End Function
    Exceptions
    Type Condition
    System.ArgumentNullException

    Stream cannot be null.

    SaveAsync(String)

    Asynchronously exports the SfRichTextBoxAdv document content into the specified file.

    Declaration
    public Task<bool> SaveAsync(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The name of the file along with its path and extension.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    A task that represents the asynchronous save operation.

    Examples

    The following code example demonstrates how to asynchronously export the SfRichTextBoxAdv content into a file.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv"/>
    public async void SaveFile()
    {
        // Exports the content into the file at the specified path as Docx Format asynchronously.
        await richTextBoxAdv.SaveAsync("D:/Sample.docx");
    }
    Public Async Function SaveFile() As Task
        ' Exports the content into the file at the specified path as Docx Format asynchronously.
        Await richTextBoxAdv.SaveAsync("D:/Sample.docx")
    End Function
    Exceptions
    Type Condition
    System.ArgumentNullException

    File name cannot be null.

    Events

    CommentAdding

    Occurs when the CommentAdv is added to the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.CommentAddingEventHandler CommentAdding
    Event Type
    Type
    SfRichTextBoxAdv.CommentAddingEventHandler
    Examples

    The following code example demonstrates how to define author, inital and visual style of the comment. when a hyperlink is tapped or clicked by using CTRL key.

    <RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" CommentAdding="RichTextBoxAdv_CommentAdding" />
    bool isFileLoading = false;
    

    public void RichTextBoxAdv_CommentAdding(object obj, CommentAddingEventArgs args) { if (isFileLoading) return; // Defines the author and intial of the comment. CommentAdv commentAdv = args.Comment; commentAdv.Author = "Peter"; commentAdv.Initial = "F";

    // Defines the visual style of the comment.
    CommentVisualStyle visualStyle = args.VisualStyle;
    visualStyle.BackgroundBrush = new SolidColorBrush(Colors.LightPink);
    visualStyle.BorderBrush = new SolidColorBrush(Colors.Pink);
    visualStyle.HighlightColor = Colors.LightPink;
    

    }

    Dim isFileLoading As Boolean = False
    
    Public Sub RichTextBoxAdv_CommentAdding(obj As Object, args As CommentAddingEventArgs)
        If isFileLoading Then
            Return
        End If
        ' Defines the author and intial of the comment.
        Dim commentAdv As CommentAdv = args.Comment
        commentAdv.Author = "Peter"
        commentAdv.Initial = "F"
    
        ' Defines the visual style of the comment.
        Dim visualStyle As CommentVisualStyle = args.VisualStyle
        visualStyle.BackgroundBrush = New SolidColorBrush(Colors.LightPink)
        visualStyle.BorderBrush = New SolidColorBrush(Colors.Pink)
        visualStyle.HighlightColor = Colors.LightPink
    End Sub

    ContentChanged

    Occurs when the content is changed in the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.ContentChangedEventHandler ContentChanged
    Event Type
    Type
    SfRichTextBoxAdv.ContentChangedEventHandler
    Remarks

    This event will be triggered whenever operations such as content insertion, content deletion, formatting changes occur in the SfRichTextBoxAdv.

    DocumentChanged

    Occurs when the document is changed in the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.DocumentChangedEventHandler DocumentChanged
    Event Type
    Type
    SfRichTextBoxAdv.DocumentChangedEventHandler
    Remarks

    This event can be used to stop the busy indicator when document opening process completed and start showing the busy indicator using DocumentChanging event

    DocumentChanging

    Occurs when opening a document in the SfRichTextBoxAdv.

    Declaration
    public event EventHandler<DocumentChangingEventArgs> DocumentChanging
    Event Type
    Type
    System.EventHandler<DocumentChangingEventArgs>
    Remarks

    This event can be used to start the busy indicator when document opening process starts and stop showing the busy indicator using DocumentChanged event

    DocumentSaved

    Occurs after the document is saved in the SfRichTextBoxAdv.

    Declaration
    public event EventHandler<DocumentSavedEventArgs> DocumentSaved
    Event Type
    Type
    System.EventHandler<DocumentSavedEventArgs>
    Remarks

    This event can be used to stop the busy indicator when document saving process completed and start showing the busy indicator using DocumentSaving event

    DocumentSaving

    Occurs when saving a document in the SfRichTextBoxAdv.

    Declaration
    public event EventHandler<DocumentSavingEventArgs> DocumentSaving
    Event Type
    Type
    System.EventHandler<DocumentSavingEventArgs>
    Remarks

    This event can be used to start the busy indicator when document saving process starts and stop showing the busy indicator using DocumentSaved event

    FileLoadingFailed

    Occurs when the file loading operation is failed in the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.FileLoadingFailedEventHandler FileLoadingFailed
    Event Type
    Type
    SfRichTextBoxAdv.FileLoadingFailedEventHandler

    PrintCompleted

    Occurs when the printing is completed in the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.PrintCompletedEventHandler PrintCompleted
    Event Type
    Type
    SfRichTextBoxAdv.PrintCompletedEventHandler

    RequestNavigate

    Occurs when hyperlink navigation is requested in the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.RequestNavigateEventHandler RequestNavigate
    Event Type
    Type
    SfRichTextBoxAdv.RequestNavigateEventHandler
    Examples

    The following code example demonstrates how to customize the hyperlink navigation.

    <RichTextBoxAdv:SfRichTextBoxAdv xmlns:RichTextBoxAdv="clr-namespace:Syncfusion.Windows.Controls.RichTextBoxAdv;assembly=Syncfusion.SfRichTextBoxAdv.WPF"
       x:Name="richTextBoxAdv" RequestNavigate="SfRichTextBoxAdv_RequestNavigate"/>
    void SfRichTextBoxAdv_RequestNavigate(object obj, Syncfusion.Windows.Controls.RichTextBoxAdv.RequestNavigateEventArgs args)
    {
        if (args.Hyperlink.LinkType == Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.Webpage 
            || args.Hyperlink.LinkType == Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.Email)
        {
            Uri uri = new Uri(args.Hyperlink.NavigationLink);
            Process.Start(new ProcessStartInfo(uri.AbsoluteUri));
        }
        else if (args.Hyperlink.LinkType == Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.File && File.Exists(args.Hyperlink.NavigationLink))
            Process.Start(args.Hyperlink.NavigationLink);
    }
    Public Sub SfRichTextBoxAdv_RequestNavigate(obj As Object, args As Syncfusion.Windows.Controls.RichTextBoxAdv.RequestNavigateEventArgs)
       If args.Hyperlink.LinkType = Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.Webpage 
           OrElse args.Hyperlink.LinkType = Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.Email Then
           Dim uri As New Uri(args.Hyperlink.NavigationLink)
           Process.Start(New ProcessStartInfo(uri.AbsoluteUri))
       ElseIf args.Hyperlink.LinkType = Syncfusion.Windows.Controls.RichTextBoxAdv.HyperlinkType.File AndAlso File.Exists(args.Hyperlink.NavigationLink) Then
           Process.Start(args.Hyperlink.NavigationLink)
       End If
    End Sub

    SelectionChanged

    Occurs when the selection is changed in the SfRichTextBoxAdv.

    Declaration
    public event SfRichTextBoxAdv.SelectionChangedEventHandler SelectionChanged
    Event Type
    Type
    SfRichTextBoxAdv.SelectionChangedEventHandler

    ZoomFactorChanged

    Occurs when the zoom factor is changed in the SfRichTextBoxAdv.

    Declaration
    public event DependencyPropertyChangedEventHandler ZoomFactorChanged
    Event Type
    Type
    System.Windows.DependencyPropertyChangedEventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved