Changes the document between flow, unwrapped-flow, and paged layout modes.
Definition
Namespace:Telerik.WinForms.Documents.RichTextBoxCommands
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class ChangeLayoutModeCommand : RichTextBoxCommandBase, ICommand
Inheritance: objectRichTextBoxCommandBaseChangeLayoutModeCommand
Implements:
Inherited Members
Constructors
Initializes the command and subscribes to the editor's layout-mode change notifications.
public ChangeLayoutModeCommand(RadRichTextBox editor)
The editor whose document layout mode can be changed.
Properties
Disallows execution while document protection is enforced, regardless of the caret position.
protected override CanExecuteBehaviorInProtectedDocument CanExecuteBehaviorInProtectedDocument { get; }
Overrides:
Allows this view-only command to run when the current selection intersects a read-only range.
protected override bool CanExecuteInReadOnlyRange { get; }
Overrides:
Methods
Changes the editor's document layout mode when the parameter is a DocumentLayoutMode or a string that parses to one.
protected override void ExecuteOverride(object parameter)
A layout mode or its parseable string name. Other values are ignored.
Overrides:
Raises LayoutModeChanged with the supplied mode values.
protected virtual void OnLayoutModeChanged(DocumentLayoutMode oldValue, DocumentLayoutMode newValue)
The mode last observed by this command before the notification. On the first notification, it may be the enum default if the command was created after the document had already changed modes.
newValueDocumentLayoutModeThe editor's current document layout mode.
Updates derived command state after the current span or paragraph style changes.
protected override void UpdateSpanStyle()
Overrides:
Events
Occurs when the associated editor reports a document layout-mode change, including changes made outside this command.
public event EventHandler<StylePropertyChangedEventArgs<DocumentLayoutMode>> LayoutModeChanged