ClassDialogWindowBase
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
Identifies the
Declaration
public static readonly DependencyProperty BorderBackgroundProperty
Field Value
DependencyProperty
CanUserRenameProperty
Identifies the CanUserRename dependency property.
Declaration
public static readonly DependencyProperty CanUserRenameProperty
Field Value
DependencyProperty
DialogResultProperty
Identifies the
Declaration
public static readonly DependencyProperty DialogResultProperty
Field Value
DependencyProperty
DialogStartupLocationProperty
Identifies the
Declaration
public static readonly DependencyProperty DialogStartupLocationProperty
Field Value
DependencyProperty
DragDropBehaviorProperty
Identifies the DragDropBehavior dependency property.
Declaration
public static readonly DependencyProperty DragDropBehaviorProperty
Field Value
DependencyProperty
ExpandToCurrentDirectoryProperty
Identifies the
Declaration
public static readonly DependencyProperty ExpandToCurrentDirectoryProperty
Field Value
DependencyProperty
IconProperty
Identifies the
Declaration
public static readonly DependencyProperty IconProperty
Field Value
DependencyProperty
IconTemplateProperty
Identifies the
Declaration
public static readonly DependencyProperty IconTemplateProperty
Field Value
DependencyProperty
IsDragDropEnabledProperty
Identifies the IsDragDropEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDragDropEnabledProperty
Field Value
DependencyProperty
LoadDrivesInBackgroundProperty
Identifies the LoadDrivesInBackground dependency property.
Declaration
public static readonly DependencyProperty LoadDrivesInBackgroundProperty
Field Value
DependencyProperty
ResponseButtonProperty
Identifies the
Declaration
public static readonly DependencyProperty ResponseButtonProperty
Field Value
DependencyProperty
ShowHiddenFilesProperty
Identifies the ShowHiddenFiles dependency property.
Declaration
public static readonly DependencyProperty ShowHiddenFilesProperty
Field Value
DependencyProperty
Properties
BorderBackground
Gets or sets a brush to be used to draw the title of DialogWindow. This is a dependency property.
Declaration
public Brush BorderBackground { get; set; }
Property Value
Brush
CanUserRename
Gets or sets a value indicating whether the user can rename file or folders via mouse click or keyboard F2 press in main pane.
CustomPlaces
Gets or sets the collection of custom places.
DialogResult
Gets or sets a DialogResult value for the RadWindow. This is a dependency property.
DialogStartupLocation
Gets or sets a DialogStartupLocation value for this DialogWindowBase. This is a dependency property.
Declaration
public WindowStartupLocation DialogStartupLocation { get; set; }
Property Value
WindowStartupLocation
DragDropBehavior
Gets or sets the FileBrowserDragDropBehavior for this DialogWindowBase.
Declaration
public FileBrowserDragDropBehavior DragDropBehavior { get; set; }
Property Value
ExpandToCurrentDirectory
Gets or sets a value indicating whether the main navigation pane expands and brings into view the current directory.
Declaration
public bool ExpandToCurrentDirectory { get; set; }
Property Value
FileName
Gets or sets a string containing the selected file name, including the path. Short file name without the full path is not supported.
FileSystemInfoWrapperFactory
Gets the FileSystemInfoWrapperFactoryBase for this DialogWindowBase.
Declaration
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Property Value
Icon
Gets or sets the Icon image to appear in the RadWindow title bar. This is a dependency property.
IconTemplate
Gets or sets the IconTemplate property. This is a dependency property.
Declaration
public DataTemplate IconTemplate { get; set; }
Property Value
DataTemplate
InitialDirectory
Gets or sets the initial directory.
InitialSelectedLayout
Gets or sets the initial LayoutType.
Declaration
public LayoutType InitialSelectedLayout { get; set; }
Property Value
IsDragDropEnabled
Gets or sets a value indicating whether this DialogWindowBase allows drag-drop operations.
LoadDrivesInBackground
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.
RestoreDirectory
Gets or sets a value indicating whether the dialog box restores the directory to the previously selected directory before closing.
ShowHiddenFiles
Gets or sets a boolean value indicating whether hidden files and folders should be visible in the Dialog.
ShowNetworkLocations
Gets or sets a value indicating whether the dialog shows network computers in the navigation tree.
Methods
ChangeVisualState(bool)
Updates the visual state of the control.
Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
useTransitions
Indicates whether transitions should be used.
Overrides
GetDialogViewModelCustomPlaces()
Provides the CustomPlaces as list of DirectoryInfoWrappers to the DialogViewModel of this DialogWindowBase instance.
Declaration
protected virtual IList<DirectoryInfoWrapper> GetDialogViewModelCustomPlaces()
Returns
GetDialogViewModelInitialDirectory()
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.
Declaration
protected virtual DirectoryInfoWrapper GetDialogViewModelInitialDirectory()
Returns
GetParentDialogWindow(DependencyObject)
This walks the visual tree for a parent of a specific type.
Declaration
public static DialogWindowBase GetParentDialogWindow(DependencyObject child)
Parameters
child
DependencyObject
The object which parent is searched.
Returns
GetResponseButton(DependencyObject)
Gets the response button.
Declaration
public static ResponseButton GetResponseButton(DependencyObject button)
Parameters
button
DependencyObject
The button.
Returns
GetWindowOwner()
Declaration
protected override ContentControl GetWindowOwner()
Returns
ContentControl
Overrides
GetWindowOwnerHandle()
Gets the owner handle of the WindowBase.
GetWindowStartupLocation()
Declaration
protected override WindowStartupLocation GetWindowStartupLocation()
Returns
WindowStartupLocation
Overrides
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
Declaration
public override void OnApplyTemplate()
OnClosed()
Declaration
protected override void OnClosed()
Overrides
OnClosed(WindowClosedEventArgs)
Raises the event.
Declaration
protected virtual void OnClosed(WindowClosedEventArgs args)
Parameters
args
The WindowClosedEventArgs instance containing the event data.
OnCreateAutomationPeer()
Create the automation peer for this class.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
Overrides
OnGotFocus(RoutedEventArgs)
Called before the event occurs.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
The data for the event.
OnKeyDown(KeyEventArgs)
Called before the event occurs.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgs
The data for the event.
OnLostFocus(RoutedEventArgs)
Called before the event occurs.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
e
RoutedEventArgs
The data for the event.
OnPreviewClosed(WindowPreviewClosedEventArgs)
Raises the event.
Declaration
protected virtual void OnPreviewClosed(WindowPreviewClosedEventArgs args)
Parameters
args
The WindowPreviewClosedEventArgs instance containing the event data.
OpenFileInternal(FileMode, FileAccess)
Creates a FileStream with the specified FileMode and FileAccess.
Declaration
protected Stream OpenFileInternal(FileMode fileMode, FileAccess fileAccess)
Parameters
fileMode
fileAccess
Returns
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.
SaveStateOnAccept()
Save information from the OpenFileDialogViewModel into this DialogWindowBase instance before the window is closed on Accept.
Declaration
protected virtual void SaveStateOnAccept()
SetResponseButton(DependencyObject, ResponseButton)
Sets the response button.
Declaration
public static void SetResponseButton(DependencyObject button, ResponseButton value)
Parameters
button
DependencyObject
The button.
value
The ResponseButton value.
ShouldFocusOnActivate()
Declaration
protected override bool ShouldFocusOnActivate()
Returns
Overrides
ShowDialog()
Opens modal DialogWindow in case it hasn't been already opened.
Events
Closed
Occurs when the DialogWindowBase is closed.
Declaration
[SRCategory("Behavior")]
public event EventHandler<WindowClosedEventArgs> Closed
Event Value
Remarks
The event is raised right next after the
DirectoryNavigating
Occurs when the current folder is about to change.
Declaration
public event EventHandler<DirectoryNavigatingEventArgs> DirectoryNavigating
Event Value
DirectoryRequesting
Occurs when the DirectoryInfo wrapper is about to be created.
Declaration
public event EventHandler<DirectoryRequestingEventArgs> DirectoryRequesting
Event Value
ExceptionRaised
Occurs when the Exception is raised.
Declaration
public event EventHandler<FileBrowserExceptionRaisedEventArgs> ExceptionRaised
Event Value
PreviewClosed
Occurs when the DialogWindowBase is closing.
Declaration
[SRCategory("Behavior")]
public event EventHandler<WindowPreviewClosedEventArgs> PreviewClosed
Event Value
Remarks
The event is raised whenever the
Renaming
Occurs when a file or directory is about to enter edit mode.
Declaration
public event EventHandler<RenamingEventArgs> Renaming
Event Value
ShellContextMenuOpening
Occurs when context menu is about to open.
Declaration
public event EventHandler<ContextMenuOpeningEventArgs> ShellContextMenuOpening
Event Value