Class
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:

cs-api-definition
[TelerikToolboxCategory("File Dialogs")]
public class RadOpenFileDialog : DialogWindowBase, INotifyLayoutChange, IDragAware, IMultiSelectable, IMultiFilesSelectable, IFileExtensionFilterable

Inheritance: objectWindowBaseDialogWindowBaseRadOpenFileDialog

Implements: IDragAwareIFileExtensionFilterableIMultiFilesSelectableIMultiSelectableINotifyLayoutChange

Inherited Members DialogWindowBase.ResponseButtonPropertyDialogWindowBase.DialogResultPropertyDialogWindowBase.BorderBackgroundPropertyDialogWindowBase.IconPropertyDialogWindowBase.IconTemplatePropertyDialogWindowBase.DialogStartupLocationPropertyDialogWindowBase.IsDragDropEnabledPropertyDialogWindowBase.DragDropBehaviorPropertyDialogWindowBase.ExpandToCurrentDirectoryPropertyDialogWindowBase.ShowHiddenFilesPropertyDialogWindowBase.LoadDrivesInBackgroundPropertyDialogWindowBase.CanUserRenamePropertyDialogWindowBase.GetParentDialogWindow(DependencyObject)DialogWindowBase.GetResponseButton(DependencyObject)DialogWindowBase.SetResponseButton(DependencyObject, ResponseButton)DialogWindowBase.OnApplyTemplate()DialogWindowBase.ShowDialog()DialogWindowBase.ShouldFocusOnActivate()DialogWindowBase.OpenFileInternal(FileMode, FileAccess)DialogWindowBase.ChangeVisualState(bool)DialogWindowBase.GetDialogViewModelCustomPlaces()DialogWindowBase.GetDialogViewModelInitialDirectory()DialogWindowBase.GetWindowOwnerHandle()DialogWindowBase.OnPreviewClosed(WindowPreviewClosedEventArgs)DialogWindowBase.OnClosed(WindowClosedEventArgs)DialogWindowBase.SaveStateOnAccept()DialogWindowBase.OnGotFocus(RoutedEventArgs)DialogWindowBase.OnLostFocus(RoutedEventArgs)DialogWindowBase.OnKeyDown(KeyEventArgs)DialogWindowBase.OnClosing()DialogWindowBase.OnPreviewClosed()DialogWindowBase.GetWindowOwner()DialogWindowBase.GetWindowStartupLocation()DialogWindowBase.OnClosed()DialogWindowBase.FileNameDialogWindowBase.ShowNetworkLocationsDialogWindowBase.LoadDrivesInBackgroundDialogWindowBase.InitialDirectoryDialogWindowBase.RestoreDirectoryDialogWindowBase.CustomPlacesDialogWindowBase.DialogResultDialogWindowBase.BorderBackgroundDialogWindowBase.IconDialogWindowBase.IconTemplateDialogWindowBase.DialogStartupLocationDialogWindowBase.IsDragDropEnabledDialogWindowBase.DragDropBehaviorDialogWindowBase.ExpandToCurrentDirectoryDialogWindowBase.ShowHiddenFilesDialogWindowBase.CanUserRenameDialogWindowBase.InitialSelectedLayoutDialogWindowBase.FileSystemInfoWrapperFactoryDialogWindowBase.ClosedDialogWindowBase.PreviewClosedDialogWindowBase.ExceptionRaisedDialogWindowBase.DirectoryRequestingDialogWindowBase.DirectoryNavigatingDialogWindowBase.ShellContextMenuOpeningDialogWindowBase.RenamingWindowBase.IsModalPropertyWindowBase.IsOpenPropertyWindowBase.IsResizingPropertyWindowBase.IsDraggingPropertyWindowBase.IsActiveWindowPropertyWindowBase.IsInActiveStatePropertyWindowBase.IsTopmostPropertyWindowBase.CaptionHeightPropertyWindowBase.ResizeBorderPropertyWindowBase.LeftPropertyWindowBase.TopPropertyWindowBase.WindowStatePropertyWindowBase.ResizeModePropertyWindowBase.CanClosePropertyWindowBase.CanMovePropertyWindowBase.SizeToContentPropertyWindowBase.HideMinimizeButtonPropertyWindowBase.HideMaximizeButtonPropertyWindowBase.CornerRadiusPropertyWindowBase.Close()WindowBase.GetZIndex()WindowBase.BringToFront()WindowBase.GetNormalSizeAndPosition()WindowBase.ShouldActivateOnShow()WindowBase.ShouldShowInTaskSwitcher()WindowBase.ShouldActivate()WindowBase.ChangeVisualState()WindowBase.ShowWindow(bool)WindowBase.CheckCanClose()WindowBase.OnLayoutChangeEnded(EventArgs)WindowBase.OnLocationChanged(EventArgs)WindowBase.OnLayoutChangeStarted(EventArgs)WindowBase.OnWindowStateChanged(EventArgs)WindowBase.OnHostCreated(HostWindowCreatedEventArgs)WindowBase.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)WindowBase.GetApplicationSize()WindowBase.OnLayoutChangeEnded()WindowBase.OnLayoutChangeStarted()WindowBase.CloseWithoutEventsAndAnimations()WindowBase.OnCloseAnimationFinished()WindowBase.OnShowAnimationFinished()WindowBase.OnRightMouseButtonUp()WindowBase.OnRootVisualSizeChanged()WindowBase.OnDragStart(Point, bool)WindowBase.OnDragEnd(Point, bool, bool)WindowBase.OnDragDelta(Point, Rect, Rect, bool)WindowBase.OnActivated(EventArgs)WindowBase.OnDeactivated(EventArgs)WindowBase.ShouldSystemMenuOnRightClick()WindowBase.IsModalWindowBase.IsOpenWindowBase.IsTopmostWindowBase.CaptionHeightWindowBase.ResizeBorderWindowBase.LeftWindowBase.TopWindowBase.IsResizingWindowBase.IsDraggingWindowBase.IsLayoutChangingWindowBase.WindowStateWindowBase.ResizeModeWindowBase.CanCloseWindowBase.CanMoveWindowBase.IsActiveWindowWindowBase.IsInActiveStateWindowBase.CornerRadiusWindowBase.SizeToContentWindowBase.HideMaximizeButtonWindowBase.HideMinimizeButtonWindowBase.OwnerWindowBase.ActivatedWindowBase.DeactivatedWindowBase.LayoutChangeEndedWindowBase.LayoutChangeStartedWindowBase.LocationChangedWindowBase.WindowStateChanged

Constructors

RadOpenFileDialog()

Initializes a new instance of the RadOpenFileDialog class.

Declaration

cs-api-definition
public RadOpenFileDialog()

Properties

DefaultExt

Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.

Declaration

cs-api-definition
public string DefaultExt { get; set; }

Property Value

string

Implements IFileExtensionFilterable.DefaultExt

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.

Declaration

cs-api-definition
public bool DereferenceLinks { get; set; }

Property Value

bool

FileNames

Gets or sets a string containing the selected file names, including their paths.

Declaration

cs-api-definition
public IEnumerable<string> FileNames { get; protected set; }

Property Value

IEnumerable<string>

Implements IMultiFilesSelectable.FileNames

Filter

Gets or sets the filter string that describes the list of extensions to filter by.

Declaration

cs-api-definition
public string Filter { get; set; }

Property Value

string

Implements IFileExtensionFilterable.Filter

FilterIndex

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.

Declaration

cs-api-definition
public int FilterIndex { get; set; }

Property Value

int

Implements IFileExtensionFilterable.FilterIndex

Multiselect

Gets or sets a value indicating whether multiple selection of files or folders is allowed.

Declaration

cs-api-definition
public bool Multiselect { get; set; }

Property Value

bool

Implements IMultiSelectable.Multiselect

ReadOnlyChecked

Gets or sets a value indicating whether the read-only check box is selected.

Declaration

cs-api-definition
public bool ReadOnlyChecked { get; set; }

Property Value

bool

SafeFileNames

Gets or sets a string containing the selected file names, excluding their paths.

Declaration

cs-api-definition
public IEnumerable<string> SafeFileNames { get; protected set; }

Property Value

IEnumerable<string>

Implements IMultiFilesSelectable.SafeFileNames

ShowReadOnly

Gets or sets a value indicating whether the dialog contains a read-only check box.

Declaration

cs-api-definition
public bool ShowReadOnly { get; set; }

Property Value

bool

Methods

OnCreateAutomationPeer()

Create the automation peer for this class.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

Overrides DialogWindowBase.OnCreateAutomationPeer()

OnInitialized(EventArgs)

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

OpenFile()

Opens a read-only stream for the file that is selected by the user using RadOpenFileDialog />.

Declaration

cs-api-definition
[SecurityCritical]
public Stream OpenFile()

Returns

Stream

A new Stream that contains the selected file.

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.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()