RadOpenFileDialog
Represents a dialog that allows user selection of filename for a file to be opened.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.FileDialogs.dll
Syntax:
[TelerikToolboxCategory("File Dialogs")]
public class RadOpenFileDialog : DialogWindowBase, INotifyLayoutChange, IDragAware, IMultiSelectable, IMultiFilesSelectable, IFileExtensionFilterable
Inheritance: objectWindowBaseDialogWindowBaseRadOpenFileDialog
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadOpenFileDialog class.
public RadOpenFileDialog()
Properties
Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.
public string DefaultExt { get; set; }
Implements:
Gets or sets a value indicating whether a file dialog returns either the location of the file referenced by a shortcut or the location of the shortcut file.
public bool DereferenceLinks { get; set; }
Gets or sets a string containing the selected file names, including their paths.
public IEnumerable<string> FileNames { get; protected set; }
Implements:
Gets or sets the filter string that describes the list of extensions to filter by.
public string Filter { get; set; }
Implements:
Gets or sets the currently selected extension filter from the extensions described in the Filter property. The index value of the first filter entry is 1.
public int FilterIndex { get; set; }
Implements:
Gets or sets a value indicating whether multiple selection of files or folders is allowed.
public bool Multiselect { get; set; }
Implements:
Gets or sets a value indicating whether the read-only check box is selected.
public bool ReadOnlyChecked { get; set; }
Gets or sets a string containing the selected file names, excluding their paths.
public IEnumerable<string> SafeFileNames { get; protected set; }
Implements:
Gets or sets a value indicating whether the dialog contains a read-only check box.
public bool ShowReadOnly { get; set; }
Methods
OnCreateAutomationPeer()
AutomationPeer
Create the automation peer for this class.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Overrides:
Opens a read-only stream for the file that is selected by the user using RadOpenFileDialog />.
[SecurityCritical]
public Stream OpenFile()
A new Stream that contains the selected file.
Exceptions:Selected file is null.
Selected file is empty string, contains only white space, contains one or more invalid characters, or refers to a non-file device.
Selected file refers to a non-file device.
Selected file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open, and the file specified by path does not exist. The file must already exist in these modes.
An I/O error occurred or the stream has been closed.
The caller does not have the required permission.
Selected file is invalid, such as being on an unmapped drive.
The access requested is not permitted by the operating system for the specified path, such as when access is Write or ReadWrite and the file or directory is set for read-only access.
The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.
The specified mode contains an invalid value.
Resets the theme.
public void ResetTheme()