skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DialogWindowBase

Base class for file and folder dialogs.

Inheritance
System.Object
WindowBase
DialogWindowBase
RadOpenFileDialog
RadOpenFolderDialog
RadSaveFileDialog
Inherited Members
WindowBase.IsModalProperty
WindowBase.IsOpenProperty
WindowBase.IsResizingProperty
WindowBase.IsDraggingProperty
WindowBase.IsActiveWindowProperty
WindowBase.IsInActiveStateProperty
WindowBase.IsTopmostProperty
WindowBase.CaptionHeightProperty
WindowBase.ResizeBorderProperty
WindowBase.LeftProperty
WindowBase.TopProperty
WindowBase.WindowStateProperty
WindowBase.ResizeModeProperty
WindowBase.CanCloseProperty
WindowBase.CanMoveProperty
WindowBase.SizeToContentProperty
WindowBase.HideMinimizeButtonProperty
WindowBase.HideMaximizeButtonProperty
WindowBase.CornerRadiusProperty
WindowBase.Close()
WindowBase.GetZIndex()
WindowBase.BringToFront()
WindowBase.GetNormalSizeAndPosition()
WindowBase.IDragAware.OnDragStart(Point, Boolean)
WindowBase.IDragAware.OnDragEnd(Point, Boolean, Boolean)
WindowBase.IDragAware.OnDragDelta(Point, Rect, Rect, Boolean)
WindowBase.ShouldActivateOnShow()
WindowBase.ShouldShowInTaskSwitcher()
WindowBase.ShouldActivate()
WindowBase.ChangeVisualState()
WindowBase.ShowWindow(Boolean)
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, Boolean)
WindowBase.OnDragEnd(Point, Boolean, Boolean)
WindowBase.OnDragDelta(Point, Rect, Rect, Boolean)
WindowBase.OnActivated(EventArgs)
WindowBase.OnDeactivated(EventArgs)
WindowBase.ShouldSystemMenuOnRightClick()
WindowBase.IsModal
WindowBase.IsOpen
WindowBase.IsTopmost
WindowBase.CaptionHeight
WindowBase.ResizeBorder
WindowBase.Left
WindowBase.Top
WindowBase.IsResizing
WindowBase.IsDragging
WindowBase.IsLayoutChanging
WindowBase.WindowState
WindowBase.ResizeMode
WindowBase.CanClose
WindowBase.CanMove
WindowBase.IsActiveWindow
WindowBase.IsInActiveState
WindowBase.CornerRadius
WindowBase.SizeToContent
WindowBase.HideMaximizeButton
WindowBase.HideMinimizeButton
WindowBase.Owner
WindowBase.Activated
WindowBase.Deactivated
WindowBase.LayoutChangeEnded
WindowBase.LayoutChangeStarted
WindowBase.LocationChanged
WindowBase.WindowStateChanged
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.FileDialogs.dll

Syntax

public abstract class DialogWindowBase : WindowBase, INotifyLayoutChange, IWindowDragAware, IDragAware, IClickAware

Fields

BorderBackgroundProperty

Identifies the BorderBackground dependency property.

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 DialogResult dependency property.

Declaration
public static readonly DependencyProperty DialogResultProperty
Field Value
System.Windows.DependencyProperty

DialogStartupLocationProperty

Identifies the DialogStartupLocation dependency property.

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 ExpandToCurrentDirectory dependency property.

Declaration
public static readonly DependencyProperty ExpandToCurrentDirectoryProperty
Field Value
System.Windows.DependencyProperty

IconProperty

Identifies the Icon dependency property.

Declaration
public static readonly DependencyProperty IconProperty
Field Value
System.Windows.DependencyProperty

IconTemplateProperty

Identifies the IconTemplate dependency property.

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 ResponseButton Property.

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 Nullable<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
WindowBase.ChangeVisualState(Boolean)

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
WindowBase.GetWindowOwner()

GetWindowOwnerHandle()

Gets the owner handle of the WindowBase.

Declaration
protected override IntPtr GetWindowOwnerHandle()
Returns
System.IntPtr

Overrides
WindowBase.GetWindowOwnerHandle()

GetWindowStartupLocation()

Declaration
protected override WindowStartupLocation GetWindowStartupLocation()
Returns
System.Windows.WindowStartupLocation

Overrides
WindowBase.GetWindowStartupLocation()

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()

Declaration
protected override void OnClosed()
Overrides
WindowBase.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
WindowBase.OnClosing()

OnCreateAutomationPeer()

Create the automation peer for this class.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer

Overrides
WindowBase.OnCreateAutomationPeer()

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
WindowBase.ShouldFocusOnActivate()

ShowDialog()

Opens modal DialogWindow in case it hasn't been already opened.

Declaration
public Nullable<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 PreviewClosed event. Both events are raise by Close method.

DirectoryNavigating

Occurs when the current folder is about to change.

Declaration
public event EventHandler<DirectoryNavigatingEventArgs> DirectoryNavigating
Event Type
System.EventHandler<DirectoryNavigatingEventArgs>

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 Close method is invoked.

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>

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.