Class DialogWindowBase
Base class for file and folder dialogs.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.FileDialogs.dll
Syntax
public abstract class DialogWindowBase : WindowBase, INotifyLayoutChange, IWindowDragAware, IDragAware, IClickAware
Fields
BorderBackgroundProperty
Identifies the
Declaration
public static readonly DependencyProperty BorderBackgroundProperty
Field Value
System.Windows.DependencyProperty
|
CanUserRenameProperty
Identifies the CanUserRename dependency property.
Declaration
public static readonly DependencyProperty CanUserRenameProperty
Field Value
System.Windows.DependencyProperty
|
DialogResultProperty
Identifies the
Declaration
public static readonly DependencyProperty DialogResultProperty
Field Value
System.Windows.DependencyProperty
|
DialogStartupLocationProperty
Identifies the
Declaration
public static readonly DependencyProperty DialogStartupLocationProperty
Field Value
System.Windows.DependencyProperty
|
DragDropBehaviorProperty
Identifies the DragDropBehavior dependency property.
Declaration
public static readonly DependencyProperty DragDropBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
ExpandToCurrentDirectoryProperty
Identifies the
Declaration
public static readonly DependencyProperty ExpandToCurrentDirectoryProperty
Field Value
System.Windows.DependencyProperty
|
IconProperty
Identifies the
Declaration
public static readonly DependencyProperty IconProperty
Field Value
System.Windows.DependencyProperty
|
IconTemplateProperty
Identifies the
Declaration
public static readonly DependencyProperty IconTemplateProperty
Field Value
System.Windows.DependencyProperty
|
IsDragDropEnabledProperty
Identifies the IsDragDropEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDragDropEnabledProperty
Field Value
System.Windows.DependencyProperty
|
LoadDrivesInBackgroundProperty
Identifies the LoadDrivesInBackground dependency property.
Declaration
public static readonly DependencyProperty LoadDrivesInBackgroundProperty
Field Value
System.Windows.DependencyProperty
|
ResponseButtonProperty
Identifies the
Declaration
public static readonly DependencyProperty ResponseButtonProperty
Field Value
System.Windows.DependencyProperty
|
ShowHiddenFilesProperty
Identifies the ShowHiddenFiles dependency property.
Declaration
public static readonly DependencyProperty ShowHiddenFilesProperty
Field Value
System.Windows.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
System.Windows.Media.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.
Declaration
public bool CanUserRename { get; set; }
Property Value
System.Boolean
|
CustomPlaces
Gets or sets the collection of custom places.
Declaration
public IList<string> CustomPlaces { get; }
Property Value
System.Collections.Generic.IList<System.String>
|
DialogResult
Gets or sets a DialogResult value for the RadWindow. This is a dependency property.
Declaration
public bool? DialogResult { get; set; }
Property Value
System.Nullable<System.Boolean>
|
DialogStartupLocation
Gets or sets a DialogStartupLocation value for this DialogWindowBase. This is a dependency property.
Declaration
public WindowStartupLocation DialogStartupLocation { get; set; }
Property Value
System.Windows.WindowStartupLocation
|
DragDropBehavior
Gets or sets the FileBrowserDragDropBehavior for this DialogWindowBase.
Declaration
public FileBrowserDragDropBehavior DragDropBehavior { get; set; }
Property Value
FileBrowserDragDropBehavior
|
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
System.Boolean
|
FileName
Gets or sets a string containing the selected file name, including the path. Short file name without the full path is not supported.
Declaration
public string FileName { get; set; }
Property Value
System.String
|
FileSystemInfoWrapperFactory
Gets the FileSystemInfoWrapperFactoryBase for this DialogWindowBase.
Declaration
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Property Value
FileSystemInfoWrapperFactoryBase
|
Icon
Gets or sets the Icon image to appear in the RadWindow title bar. This is a dependency property.
Declaration
public object Icon { get; set; }
Property Value
System.Object
|
IconTemplate
Gets or sets the IconTemplate property. This is a dependency property.
Declaration
public DataTemplate IconTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
InitialDirectory
Gets or sets the initial directory.
Declaration
public string InitialDirectory { get; set; }
Property Value
System.String
|
InitialSelectedLayout
Gets or sets the initial LayoutType.
Declaration
public LayoutType InitialSelectedLayout { get; set; }
Property Value
LayoutType
|
IsDragDropEnabled
Gets or sets a value indicating whether this DialogWindowBase allows drag-drop operations.
Declaration
public bool IsDragDropEnabled { get; set; }
Property Value
System.Boolean
|
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.
Declaration
public bool LoadDrivesInBackground { get; set; }
Property Value
System.Boolean
|
RestoreDirectory
Gets or sets a value indicating whether the dialog box restores the directory to the previously selected directory before closing.
Declaration
public bool RestoreDirectory { get; set; }
Property Value
System.Boolean
|
ShowHiddenFiles
Gets or sets a boolean value indicating whether hidden files and folders should be visible in the Dialog.
Declaration
public bool ShowHiddenFiles { get; set; }
Property Value
System.Boolean
|
ShowNetworkLocations
Gets or sets a value indicating whether the dialog shows network computers in the navigation tree.
Declaration
public bool ShowNetworkLocations { get; set; }
Property Value
System.Boolean
|
Methods
ChangeVisualState(Boolean)
Updates the visual state of the control.
Declaration
protected override void ChangeVisualState(bool useTransitions)
Parameters
System.Boolean
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
System.Collections.Generic.IList<DirectoryInfoWrapper>
|
GetDialogViewModelInitialDirectory()
Provides the InitialDirectory as DirectoryInfoWrapper to the Telerik.Windows.Controls.FileDialogs.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
DirectoryInfoWrapper
|
GetParentDialogWindow(DependencyObject)
This walks the visual tree for a parent of a specific type.
Declaration
public static DialogWindowBase GetParentDialogWindow(DependencyObject child)
Parameters
System.Windows.DependencyObject
child
The object which parent is searched. |
Returns
DialogWindowBase
|
GetResponseButton(DependencyObject)
Gets the response button.
Declaration
public static ResponseButton GetResponseButton(DependencyObject button)
Parameters
System.Windows.DependencyObject
button
The button. |
Returns
ResponseButton
|
GetWindowOwner()
Declaration
protected override ContentControl GetWindowOwner()
Returns
System.Windows.Controls.ContentControl
|
Overrides
GetWindowOwnerHandle()
Declaration
protected override IntPtr GetWindowOwnerHandle()
Returns
System.IntPtr
|
Overrides
GetWindowStartupLocation()
Declaration
protected override WindowStartupLocation GetWindowStartupLocation()
Returns
System.Windows.WindowStartupLocation
|
Overrides
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnClosed()
OnClosed(WindowClosedEventArgs)
Raises the Closed event.
Declaration
protected virtual void OnClosed(WindowClosedEventArgs args)
Parameters
WindowClosedEventArgs
args
The WindowClosedEventArgs instance containing the event data. |
OnClosing()
Declaration
protected override bool OnClosing()
Returns
System.Boolean
|
Overrides
OnCreateAutomationPeer()
Create the automation peer for this class.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
Overrides
OnGotFocus(RoutedEventArgs)
Called before the System.Windows.UIElement.GotFocus event occurs.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
The data for the event. |
OnKeyDown(KeyEventArgs)
Called before the System.Windows.UIElement.KeyDown event occurs.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs
e
The data for the event. |
OnLostFocus(RoutedEventArgs)
Called before the System.Windows.UIElement.LostFocus event occurs.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
The data for the event. |
OnPreviewClosed()
Declaration
protected virtual bool OnPreviewClosed()
Returns
System.Boolean
|
OnPreviewClosed(WindowPreviewClosedEventArgs)
Raises the PreviewClose event.
Declaration
protected virtual void OnPreviewClosed(WindowPreviewClosedEventArgs args)
Parameters
WindowPreviewClosedEventArgs
args
The WindowPreviewClosedEventArgs instance containing the event data. |
OpenFileInternal(FileMode, FileAccess)
Creates a System.IO.FileStream with the specified System.IO.FileMode and System.IO.FileAccess.
Declaration
protected Stream OpenFileInternal(FileMode fileMode, FileAccess fileAccess)
Parameters
System.IO.FileMode
fileMode
|
System.IO.FileAccess
fileAccess
|
Returns
System.IO.Stream
|
Exceptions
System.ArgumentNullException
Selected file is null. |
System.ArgumentException
Selected file is empty string, contains only white space, contains one or more invalid characters, or refers to a non-file device. |
System.NotSupportedException
Selected file refers to a non-file device. |
System.FileNotFoundException
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. |
System.IOException
An I/O error occurred or the stream has been closed. |
System.SecurityException
The caller does not have the required permission. |
System.DirectoryNotFoundException
Selected file is invalid, such as being on an unmapped drive. |
System.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. |
System.PathTooLongException
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. |
System.ArgumentOutOfRangeException
The specified mode contains an invalid value. |
SaveStateOnAccept()
Save information from the Telerik.Windows.Controls.FileDialogs.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
System.Windows.DependencyObject
button
The button. |
ResponseButton
value
The ResponseButton value. |
ShouldFocusOnActivate()
Declaration
protected override bool ShouldFocusOnActivate()
Returns
System.Boolean
|
Overrides
ShowDialog()
Opens modal DialogWindow in case it hasn't been already opened.
Declaration
public bool? ShowDialog()
Returns
System.Nullable<System.Boolean>
The DialogResult value. |
Events
Closed
Occurs when the DialogWindowBase is closed.
Declaration
[SRCategory("Behavior")]
public event EventHandler<WindowClosedEventArgs> Closed
Event Type
System.EventHandler<WindowClosedEventArgs>
|
Remarks
The event is raised right next after the
DirectoryNavigating
DirectoryRequesting
Occurs when the DirectoryInfo wrapper is about to be created.
Declaration
public event EventHandler<DirectoryRequestingEventArgs> DirectoryRequesting
Event Type
System.EventHandler<DirectoryRequestingEventArgs>
|
ExceptionRaised
Occurs when the System.Exception is raised.
Declaration
public event EventHandler<FileBrowserExceptionRaisedEventArgs> ExceptionRaised
Event Type
System.EventHandler<FileBrowserExceptionRaisedEventArgs>
|
PreviewClosed
Occurs when the DialogWindowBase is closing.
Declaration
[SRCategory("Behavior")]
public event EventHandler<WindowPreviewClosedEventArgs> PreviewClosed
Event Type
System.EventHandler<WindowPreviewClosedEventArgs>
|
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 Type
System.EventHandler<RenamingEventArgs>
|
ShellContextMenuOpening
Occurs when context menu is about to open.
Declaration
public event EventHandler<ContextMenuOpeningEventArgs> ShellContextMenuOpening
Event Type
System.EventHandler<ContextMenuOpeningEventArgs>
|