New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Constructors

C#
public FileDialogComponentBase()

Properties

Gets or sets the collection of custom places.

C#
public IList<string> CustomPlaces { get; }
C#
protected FileDialogFormBase DialogForm { get; }

Gets or sets a value indicating whether the main navigation pane expands and brings into view the current directory.

C#
public bool ExpandToCurrentDirectory { get; set; }

Gets or sets a string containing the selected file name, including the path. Short file name without the full path is not supported.

C#
public string FileName { get; set; }

Gets or sets the initial directory.

C#
public string InitialDirectory { get; set; }

Gets or sets the initialLayoutType.

C#
public LayoutType InitialSelectedLayout { get; set; }

Gets or sets a value indicating whether the dialog box restores the directory to the previously selected directory before closing.

C#
public bool RestoreDirectory { get; set; }

Gets or sets a boolean value indicating whether hidden files and folders should be visible in the Dialog.

C#
public bool ShowHiddenFiles { get; set; }

Gets or sets a value indicating whether the dialog shows network computers in the navigation tree.

C#
public bool ShowNetworkLocations { get; set; }

Methods

C#
protected abstract FileDialogFormBase CreateFileDialogForm()
Returns:

FileDialogFormBase

Creates a FileStream with the specified FileMode and FileAccess.

C#
protected Stream OpenFileInternal(FileMode fileMode, FileAccess fileAccess)
Parameters:fileModeFileModefileAccessFileAccessReturns:

Stream

Exceptions:

ArgumentNullException

Selected file is null.

ArgumentException

Selected file is empty string, contains only white space, contains one or more invalid characters, or refers to a non-file device.

NotSupportedException

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.

UnauthorizedAccessException

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.

ArgumentOutOfRangeException

The specified mode contains an invalid value.

Opens modal DialogWindow in case it hasn't been already opened.

C#
public DialogResult ShowDialog()
Returns:

DialogResult

The DialogResult value.

Opens modal DialogWindow in case it hasn't been already opened.

C#
public DialogResult ShowDialog(IWin32Window owner)
Parameters:ownerIWin32WindowReturns:

DialogResult

The DialogResult value.

Events

Occurs when the current folder is about to change.

C#
public event EventHandler<DirectoryNavigatingEventArgs> DirectoryNavigating

Occurs when the DirectoryInfo wrapper is about to be created.

C#
public event EventHandler<DirectoryRequestingEventArgs> DirectoryRequesting

Occurs when the Exception is raised.

C#
public event EventHandler<FileBrowserExceptionRaisedEventArgs> ExceptionRaised

Occurs when context menu is about to open.

C#
public event EventHandler<ContextMenuOpeningEventArgs> ShellContextMenuOpening