OpenDocumentCommand
Opens a document selected by the user and imports it with a registered document format provider.
Definition
Namespace:Telerik.WinForms.Documents.RichTextBoxCommands
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class OpenDocumentCommand : RichTextBoxCommandBase, ICommand
Inheritance: objectRichTextBoxCommandBaseOpenDocumentCommand
Implements:
Inherited Members
Constructors
Initializes the command for the specified editor; in WinForms builds, also creates the default file dialog.
public OpenDocumentCommand(RadRichTextBox editor)
The rich text box whose document is replaced by the imported document.
Properties
Gets Always because opening a document replaces the current document.
protected override CanExecuteBehaviorInProtectedDocument CanExecuteBehaviorInProtectedDocument { get; }
Overrides:
Gets a value indicating that opening a document is allowed in read-only ranges.
protected override bool CanExecuteInReadOnlyRange { get; }
Overrides:
Gets the result assigned after the file dialog is displayed; initially, the value is None.
public DialogResult DialogResult { get; }
Gets or sets the file dialog used to choose a document to open.
public OpenFileDialog OpenFileDialog { get; set; }
The assigned dialog is null.
Methods
Displays the open dialog, imports the selected file, and assigns the imported document to the editor.
protected override void ExecuteOverride(object parameter)
An optional file-type filter for the open dialog.
Overrides: