skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RichTextBoxCommandBase

Represents the base class for commands that can be executed within a RichTextBox.

Inheritance
System.Object
RichTextBoxCommandBase
AcceptAllRevisionsCommand
AcceptRevisionCommand
AddShapeTextBoxCommand
CancelFormatPainterCommand
ChangeBibliographicStyleCommand
ChangeColorCommandBase
ChangeFontFamilyCommand
ChangeFontSizeCommand
ChangeFormatPainterStateCommand
ChangeIntegratedWatermarkTypeCommand
ChangeLayoutModeCommand
ChangeListStyleCommand
ChangePageMarginsTypeCommand
ChangePageOrientationCommand
ChangePaperTypeCommand
ChangeParagraphFlowDirectionCommand
ChangeParagraphListLevelCommand
ChangeSectionColumnsCommand
ChangeSectionHeaderFooterMarginBase
ChangeStyleNameCommand
ChangeTextAlignmentCommand
ChangeUnderlineDecorationCommand
ClearAllFormattingCommand
ClearFormattingCommand
CommentCommandBase
ContinueNumberingCommand
CopyFormattingCommand
DecrementFontSizeCommand
DecrementParagraphLeftIndentCommand
DeleteCodeBlockCommand
DeleteCommand
DrawingContextCommandBase
EditFooterCommand
EditHeaderCommand
EditShapeTextBoxCommand
ExitHeaderFooterEditModeCommand
FieldRangeStartBaseCommandBase<T>
GoToNextEndnoteCommand
GoToNextFootnoteCommand
GoToNextRevisionCommand
GoToPreviousEndnoteCommand
GoToPreviousFootnoteCommand
GoToPreviousRevisionCommand
ImageContextCommandBase
IncrementFontSizeCommand
IncrementParagraphLeftIndentCommand
InsertBreakCommand
InsertColumnBreakCommand
InsertDocumentFragmentCommand
InsertEndnoteCommand
InsertFieldCommand
InsertFootnoteCommand
InsertLineBreakCommand
InsertLineNumberingCommand
InsertNonBreakingSpaceCommand
InsertPageBreakCommand
InsertPictureCommand
InsertSectionBreakCommand
InsertStructuredDocumentTagCommand
InsertTableCommand
InsertTextCommand
MailMergeDataSourceContextCommandBase
MergeTableCellsCommand
MoveCaretCommand
MoveSelectionCommand
MultipleUndoCommand
NewDocumentCommand
OpenContextMenuOnNextSpellingErrorCommand
OpenDocumentCommand
PasteCommand
PasteFormattingCommand
PrintCommand
PrintPreviewCommand
RedoCommand
RejectAllRevisionsCommand
RejectRevisionCommand
RemoveWatermarkCommand
RestartNumberingCommand
SaveCommand
SelectAllCommand
SelectionEnabledCommand
ShapeContextCommandBase
ShowAddNewBibliographicReferenceDialogCommand
ShowChangeEditingPermissionsDialogCommand
ShowCodeFormattingDialogCommand
ShowContentControlPropertiesDialogCommand
ShowDefineNewListStyleDialogCommand
ShowFindReplaceDialogCommand
ShowFontPropertiesDialogCommand
ShowInsertCaptionDialogCommand
ShowInsertCrossReferenceWindowCommand
ShowInsertDateTimeDialogCommand
ShowInsertHyperlinkDialogCommand
ShowInsertSymbolWindowCommand
ShowInsertTableDialogCommand
ShowInsertTableOfContentsDialogCommand
ShowLineNumberingDialogCommand
ShowManageBibliographicSourcesDialogCommand
ShowManageBookmarksDialogCommand
ShowManageStylesDialogCommand
ShowNotesDialogCommand
ShowParagraphPropertiesDialogCommand
ShowSectionColumnsDialogCommand
ShowSetNumberingValueDialogCommand
ShowSpellCheckingDialogCommand
ShowStyleFormattingPropertiesDialogCommand
ShowTabStopsPropertiesDialogCommand
ShowTaskPaneCommand
ShowWatermarkSettingsDialogCommand
SuppressLineNumberingForCurrentParagraphCommand
TabBackwardCommand
TabForwardCommand
TableContextCommandBase
ToggleCommandBase
ToggleInsertShapeToolCommand
UndoCommand
UpdateAllFieldsCommand
Namespace: Telerik.Windows.Documents.RichTextBoxCommands
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public abstract class RichTextBoxCommandBase : Object, ICommand

Constructors

RichTextBoxCommandBase(RadRichTextBox)

Declaration
public RichTextBoxCommandBase(RadRichTextBox editor)
Parameters
RadRichTextBox editor

Properties

AssociatedRichTextBox

Gets the associated rich text box.

Declaration
public RadRichTextBox AssociatedRichTextBox { get; }
Property Value
RadRichTextBox

The associated rich text box.

CanExecuteBehaviorInProtectedDocument

Gets a value indicating whether the behavior of the command can be executed in a protected document.

Declaration
protected virtual CanExecuteBehaviorInProtectedDocument CanExecuteBehaviorInProtectedDocument { get; }
Property Value
CanExecuteBehaviorInProtectedDocument

CanExecuteInReadOnlyMode

Gets a value indicating whether this command can be executed when RadRichTextBox is read-only. The default implementation returns false.

Declaration
protected virtual bool CanExecuteInReadOnlyMode { get; }
Property Value
System.Boolean

true if this command preserves document's content; otherwise, false.

CanExecuteInReadOnlyRange

Gets a value indicating whether this command can be executed when editing context is read-only. The default implementation returns false.

Declaration
protected virtual bool CanExecuteInReadOnlyRange { get; }
Property Value
System.Boolean

Enabled

Gets or sets a value indicating whether the command is enabled.

Declaration
public bool Enabled { get; set; }
Property Value
System.Boolean

IsDeletingCommand

Declaration
protected virtual bool IsDeletingCommand { get; }
Property Value
System.Boolean

ShouldFocusCaretAfterExecute

Declaration
protected virtual bool ShouldFocusCaretAfterExecute { get; }
Property Value
System.Boolean

SupportedTargets

Gets the supported CommandTargets for the command.

Declaration
protected virtual CommandTargets SupportedTargets { get; }
Property Value
CommandTargets

Methods

CanExecute(Object)

Determines whether the command can be executed with the specified parameter.

Declaration
public bool CanExecute(object parameter)
Parameters
System.Object parameter

The parameter to evaluate for the command execution.

Returns
System.Boolean

True if the command can be executed; otherwise, false.

CanExecuteOverride(Object)

Performs a check whether the command can be executed specific to the command.

Declaration
protected virtual bool CanExecuteOverride(object parameter)
Parameters
System.Object parameter

The command parameter.

Returns
System.Boolean

Execute()

Executes the command, performing the associated action on the RichTextBox.

Declaration
public void Execute()

Execute(Object)

Executes the command with the specified parameter.

Declaration
public void Execute(object parameter)
Parameters
System.Object parameter

The parameter to execute the command with.

Execute(Object, Boolean)

Executes the command with the specified parameter and an option to suppress events.

Declaration
public void Execute(object parameter, bool focusCaret)
Parameters
System.Object parameter

The parameter to be used during the command execution.

System.Boolean focusCaret

A boolean value indicating whether to suppress events during execution.

ExecuteOverride(Object)

Performs the execute action specific to the command.

Declaration
protected abstract void ExecuteOverride(object parameter)
Parameters
System.Object parameter

The command parameter.

GetCurrentParagraphStyle()

Declaration
protected Paragraph GetCurrentParagraphStyle()
Returns
Paragraph

GetCurrentSectionStyle()

Declaration
protected Section GetCurrentSectionStyle()
Returns
Section

GetCurrentSpanStyle()

Declaration
protected Span GetCurrentSpanStyle()
Returns
Span

GetSelectedInlineOrSelectCurrent()

Retrieves the currently selected inline element in the RichTextBox. If there is no selection, it selects the current inline element.

Declaration
public Inline GetSelectedInlineOrSelectCurrent()
Returns
Inline

The selected inline element, or the current inline element if no selection is made.

OnCanExecuteChanged()

Declaration
protected void OnCanExecuteChanged()

UpdateSectionStyle()

Declaration
protected virtual void UpdateSectionStyle()

UpdateSpanStyle()

Declaration
protected virtual void UpdateSpanStyle()

Events

CanExecuteChanged

Declaration
public event EventHandler CanExecuteChanged
Event Type
System.EventHandler

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.