ClassRichTextBoxCommandBase
Represents the base class for commands that can be executed within a RichTextBox.
Definition
Namespace:Telerik.Windows.Documents.RichTextBoxCommands
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public abstract class RichTextBoxCommandBase : ICommand
Inheritance: objectRichTextBoxCommandBase
Derived Classes:
Implements:
Constructors
RichTextBoxCommandBase(RadRichTextBox)
Declaration
public RichTextBoxCommandBase(RadRichTextBox editor)
Parameters
editor
Properties
AssociatedRichTextBox
Gets the associated rich text box.
Declaration
public RadRichTextBox AssociatedRichTextBox { get; }
Property Value
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
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
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
Enabled
Gets or sets a value indicating whether the command is enabled.
ShouldFocusCaretAfterExecute
Declaration
protected virtual bool ShouldFocusCaretAfterExecute { get; }
Property Value
SupportedTargets
Gets the supported CommandTargets for the command.
Declaration
protected virtual CommandTargets SupportedTargets { get; }
Property Value
Methods
CanExecute(object)
Determines whether the command can be executed with the specified parameter.
CanExecuteOverride(object)
Performs a check whether the command can be executed specific to the command.
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
parameter
The parameter to execute the command with.
Implements
Execute(object, bool)
Executes the command with the specified parameter and an option to suppress events.
ExecuteOverride(object)
Performs the execute action specific to the command.
Declaration
protected abstract void ExecuteOverride(object parameter)
Parameters
parameter
The command parameter.
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
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 Value
Implements