FileDialogFormBase
Base class for file and folder dialogs.
Definition
Namespace:Telerik.WinControls.FileDialogs
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class FileDialogFormBase : RadForm, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IComponentTreeHandler, ILayoutHandler, ISupportInitializeNotification, ISupportInitialize, INotifyPropertyChanged, IAnalyticsProvider, ISupportRootUIAutomation, IInvokeSelectedFileSystemObjects
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlFormRadFormControlBaseRadFormFileDialogFormBase...
Derived Classes:
Implements:
Inherited Members
Properties
CustomPlaces
IList<string>
Gets or sets the collection of custom places.
public IList<string> CustomPlaces { get; }
Gets the view model created for the current dialog session.
public DialogViewModel DialogViewModel { get; }
Determines how the files and folders in the ExplorerControl can be edited. Note that the shell context menu and drag and drop operations are handled separately.
public EditingOptions EditingOptions { get; set; }
Gets or sets a value indicating whether the main navigation pane expands and brings into view the current directory.
public bool ExpandToCurrentDirectory { get; set; }
Gets the ExplorerControl hosted by the concrete dialog form.
public virtual ExplorerControl ExplorerControl { get; }
Gets or sets a string containing the selected file name.
public string FileName { get; set; }
Gets theFileSystemInfoWrapperFactoryBase for this FileDialogFormBase.
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Gets or sets the initial directory.
public string InitialDirectory { get; set; }
Gets or sets the initialLayoutType.
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.
public bool RestoreDirectory { get; set; }
Gets or sets a boolean value indicating whether hidden files and folders should be visible in the Dialog.
public bool ShowHiddenFiles { get; set; }
Gets or sets a value indicating whether the dialog shows network computers in the navigation tree.
public bool ShowNetworkLocations { get; set; }
Gets or sets the listeners that receive the view model when dialog content is initialized.
public IList<IViewModelChangedListener> ViewModelChangedListeners { get; set; }
Methods
Determines whether the default Escape handling should cancel and close the dialog.
Provides the CustomPlaces as list of DirectoryInfoWrappers to the DialogViewModel of this FileDialogFormBase instance.
protected virtual IList<DirectoryInfoWrapper> GetDialogViewModelCustomPlaces()
IList<DirectoryInfoWrapper>
Provides the InitialDirectory as DirectoryInfoWrapper to the DialogViewModel of this FileDialogFormBase instance. Returns null if DirectoryInfo cannot be created due to incorrect InitialDirectory string or access rights.
protected virtual DirectoryInfoWrapper GetDialogViewModelInitialDirectory()
Provides a hook for concrete dialogs to accept or otherwise process the selected file-system objects.
public virtual void InvokeSelectedFileSystemObjects()
Implements:
Provides the current dialog view model to each registered view-model listener.
protected void NotifyIViewModelChangedListeners()
Schedules file-system factory cleanup and records the last-access directory only when restoration is enabled and the dialog was accepted with a view model.
Called before the KeyDown event occurs.
protected override void OnKeyDown(KeyEventArgs e)
The data for the event.
Overrides:
Finds the hosted ExplorerControl and connects its events to this dialog's event handlers.
Sets the result to Cancel and closes the dialog.
protected virtual void OnPressedCancel()
Applies the current theme to the dialog's child controls after the form theme changes.
protected override void OnThemeChanged()
Overrides:
Save information from the OpenFileDialogViewModel into this FileDialogFormBase instance before the window is closed on Accept.
protected virtual void SaveStateOnAccept()
Opens modal Dialog in case it hasn't been already opened.
Opens modal Dialog in case it hasn't been already opened.
public DialogResult ShowDialog(IWin32Window owner)
The DialogResult value.
Show for testing purposes.
protected virtual DialogResult ShowDialogCore(IWin32Window owner = null, bool addWatcher = true)
Events
Occurs when the current folder is about to change.
public event EventHandler<DirectoryNavigatingEventArgs> DirectoryNavigating
Occurs when the DirectoryInfo wrapper is about to be created.
public event EventHandler<DirectoryRequestingEventArgs> DirectoryRequesting
Occurs when the Exception is raised.
public event EventHandler<FileBrowserExceptionRaisedEventArgs> ExceptionRaised
Occurs when context menu is about to open.
public event EventHandler<ContextMenuOpeningEventArgs> ShellContextMenuOpening