Class
ToggleDocumentProtectionCommand

Executes the command that toggles the document protection state. This command can enable or disable protection for the document, allowing users to either modify the document content or restrict modifications based on the current state.

Definition

Namespace:Telerik.Windows.Documents.RichTextBoxCommands

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class ToggleDocumentProtectionCommand : ToggleCommandBase, ICommand

Inheritance: objectRichTextBoxCommandBaseToggleCommandBaseToggleDocumentProtectionCommand

Implements: ICommand

Inherited Members ToggleCommandBase.OnToggleStateChanged(StylePropertyChangedEventArgs<bool>)ToggleCommandBase.ToggleStateChangedRichTextBoxCommandBase.CanExecute(object)RichTextBoxCommandBase.CanExecuteOverride(object)RichTextBoxCommandBase.Execute()RichTextBoxCommandBase.Execute(object)RichTextBoxCommandBase.GetSelectedInlineOrSelectCurrent()RichTextBoxCommandBase.Execute(object, bool)RichTextBoxCommandBase.UpdateSectionStyle()RichTextBoxCommandBase.GetCurrentParagraphStyle()RichTextBoxCommandBase.GetCurrentSpanStyle()RichTextBoxCommandBase.GetCurrentSectionStyle()RichTextBoxCommandBase.OnCanExecuteChanged()RichTextBoxCommandBase.AssociatedRichTextBoxRichTextBoxCommandBase.CanExecuteInReadOnlyModeRichTextBoxCommandBase.IsDeletingCommandRichTextBoxCommandBase.ShouldFocusCaretAfterExecuteRichTextBoxCommandBase.SupportedTargetsRichTextBoxCommandBase.EnabledRichTextBoxCommandBase.CanExecuteChanged

Constructors

ToggleDocumentProtectionCommand(RadRichTextBox)

Declaration

cs-api-definition
public ToggleDocumentProtectionCommand(RadRichTextBox editor)

Parameters

editor

RadRichTextBox

Properties

CanExecuteBehaviorInProtectedDocument

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

Declaration

cs-api-definition
protected override CanExecuteBehaviorInProtectedDocument CanExecuteBehaviorInProtectedDocument { get; }

Property Value

CanExecuteBehaviorInProtectedDocument

Overrides RichTextBoxCommandBase.CanExecuteBehaviorInProtectedDocument

CanExecuteInReadOnlyRange

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

Declaration

cs-api-definition
protected override bool CanExecuteInReadOnlyRange { get; }

Property Value

bool

Overrides RichTextBoxCommandBase.CanExecuteInReadOnlyRange

Methods

ExecuteOverride(object)

Performs the execute action specific to the command.

Declaration

cs-api-definition
protected override void ExecuteOverride(object parameter)

Parameters

parameter

object

The command parameter.

Overrides RichTextBoxCommandBase.ExecuteOverride(object)

GetToggleState()

Declaration

cs-api-definition
protected override bool GetToggleState()

Returns

bool

Overrides ToggleCommandBase.GetToggleState()

UpdateSpanStyle()

Declaration

cs-api-definition
protected override void UpdateSpanStyle()

Overrides ToggleCommandBase.UpdateSpanStyle()