DialogWindowBase
Base class for file and folder dialogs.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.FileDialogs.dll
Syntax:
public abstract class DialogWindowBase : WindowBase, INotifyLayoutChange, IDragAware
Inheritance: objectWindowBaseDialogWindowBase
Derived Classes:
Implements:
Inherited Members
Fields
BorderBackgroundProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty BorderBackgroundProperty
CanUserRenameProperty
DependencyProperty
Identifies the CanUserRename dependency property.
public static readonly DependencyProperty CanUserRenameProperty
DialogResultProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty DialogResultProperty
DialogStartupLocationProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty DialogStartupLocationProperty
DragDropBehaviorProperty
DependencyProperty
Identifies the DragDropBehavior dependency property.
public static readonly DependencyProperty DragDropBehaviorProperty
ExpandToCurrentDirectoryProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty ExpandToCurrentDirectoryProperty
IconProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty IconProperty
IconTemplateProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty IconTemplateProperty
IsDragDropEnabledProperty
DependencyProperty
Identifies the IsDragDropEnabled dependency property.
public static readonly DependencyProperty IsDragDropEnabledProperty
LoadDrivesInBackgroundProperty
DependencyProperty
Identifies the LoadDrivesInBackground dependency property.
public static readonly DependencyProperty LoadDrivesInBackgroundProperty
ResponseButtonProperty
DependencyProperty
Identifies the
public static readonly DependencyProperty ResponseButtonProperty
ShowHiddenFilesProperty
DependencyProperty
Identifies the ShowHiddenFiles dependency property.
public static readonly DependencyProperty ShowHiddenFilesProperty
Properties
BorderBackground
Brush
Gets or sets a brush to be used to draw the title of DialogWindow. This is a dependency property.
public Brush BorderBackground { get; set; }
Gets or sets a value indicating whether the user can rename file or folders via mouse click or keyboard F2 press in main pane.
public bool CanUserRename { get; set; }
Gets or sets the collection of custom places.
public IList<string> CustomPlaces { get; }
Gets or sets a DialogResult value for the RadWindow. This is a dependency property.
public bool? DialogResult { get; set; }
DialogStartupLocation
WindowStartupLocation
Gets or sets a DialogStartupLocation value for this DialogWindowBase. This is a dependency property.
public WindowStartupLocation DialogStartupLocation { get; set; }
Gets or sets the FileBrowserDragDropBehavior for this DialogWindowBase.
public FileBrowserDragDropBehavior DragDropBehavior { 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 or sets a string containing the selected file name, including the path. Short file name without the full path is not supported.
public string FileName { get; set; }
Gets the FileSystemInfoWrapperFactoryBase for this DialogWindowBase.
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Gets or sets the Icon image to appear in the RadWindow title bar. This is a dependency property.
public object Icon { get; set; }
IconTemplate
DataTemplate
Gets or sets the IconTemplate property. This is a dependency property.
public DataTemplate IconTemplate { get; set; }
Gets or sets the initial directory.
public string InitialDirectory { get; set; }
Gets or sets the initial LayoutType.
public LayoutType InitialSelectedLayout { get; set; }
Gets or sets a value indicating whether this DialogWindowBase allows drag-drop operations.
public bool IsDragDropEnabled { get; set; }
Gets or sets a value indicating whether the control loads the drives under 'This PC' node in background thread. Could be used in scenarios when some drives are expected to load slower than normal.
public bool LoadDrivesInBackground { 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; }
Methods
Updates the visual state of the control.
protected override void ChangeVisualState(bool useTransitions)
Indicates whether transitions should be used.
Overrides:
Provides the CustomPlaces as list of DirectoryInfoWrappers to the DialogViewModel of this DialogWindowBase instance.
protected virtual IList<DirectoryInfoWrapper> GetDialogViewModelCustomPlaces()
Provides the InitialDirectory as DirectoryInfoWrapper to the DialogViewModel of this DialogWindowBase instance. Returns null if DirectoryInfo cannot be created due to incorrect InitialDirectory string or access rights.
protected virtual DirectoryInfoWrapper GetDialogViewModelInitialDirectory()
This walks the visual tree for a parent of a specific type.
public static DialogWindowBase GetParentDialogWindow(DependencyObject child)
The object which parent is searched.
Returns:Gets the response button.
public static ResponseButton GetResponseButton(DependencyObject button)
The button.
Returns:GetWindowOwner()
ContentControl
protected override ContentControl GetWindowOwner()
ContentControl
Overrides:
Gets the owner handle of the WindowBase.
GetWindowStartupLocation()
WindowStartupLocation
protected override WindowStartupLocation GetWindowStartupLocation()
WindowStartupLocation
Overrides:
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
protected override void OnClosed()
Overrides:
Raises the event.
protected virtual void OnClosed(WindowClosedEventArgs args)
The WindowClosedEventArgs instance containing the event data.
OnCreateAutomationPeer()
AutomationPeer
Create the automation peer for this class.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Overrides:
Called before the event occurs.
protected override void OnGotFocus(RoutedEventArgs e)
The data for the event.
Called before the event occurs.
protected override void OnKeyDown(KeyEventArgs e)
The data for the event.
Called before the event occurs.
protected override void OnLostFocus(RoutedEventArgs e)
The data for the event.
Raises the event.
protected virtual void OnPreviewClosed(WindowPreviewClosedEventArgs args)
The WindowPreviewClosedEventArgs instance containing the event data.
Creates a FileStream with the specified FileMode and FileAccess.
protected Stream OpenFileInternal(FileMode fileMode, FileAccess fileAccess)
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.
Save information from the OpenFileDialogViewModel into this DialogWindowBase instance before the window is closed on Accept.
protected virtual void SaveStateOnAccept()
Sets the response button.
public static void SetResponseButton(DependencyObject button, ResponseButton value)
The button.
valueResponseButtonThe ResponseButton value.
Opens modal DialogWindow in case it hasn't been already opened.
Events
Occurs when the DialogWindowBase is closed.
[SRCategory("Behavior")]
public event EventHandler<WindowClosedEventArgs> Closed
The event is raised right next after the
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 the DialogWindowBase is closing.
[SRCategory("Behavior")]
public event EventHandler<WindowPreviewClosedEventArgs> PreviewClosed
The event is raised whenever the
Occurs when a file or directory is about to enter edit mode.
public event EventHandler<RenamingEventArgs> Renaming
Occurs when context menu is about to open.
public event EventHandler<ContextMenuOpeningEventArgs> ShellContextMenuOpening