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 DialogViewModel

Base class for the different file dialogs.

Inheritance
System.Object
ViewModelBase
DialogViewModel
FileDialogViewModel
OpenFolderDialogViewModel
Inherited Members
ViewModelBase.Dispose()
ViewModelBase.InvokeOnUIThread(Action)
ViewModelBase.OnPropertyChanged(String)
ViewModelBase.VerifyPropertyName(String)
ViewModelBase.PropertyChanged
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.FileDialogs
Assembly: Telerik.WinControls.UI.dll

Syntax

public abstract class DialogViewModel : ViewModelBase, INotifyPropertyChanged, IDisposable, IDialogViewModel, ICurrentDirectoryViewModel, INotifyPropertyChanging

Constructors

DialogViewModel(FileSystemInfoWrapperFactoryBase, Boolean, String)

Initializes a new instance of the DialogViewModel class.

Declaration
protected DialogViewModel(FileSystemInfoWrapperFactoryBase fileSystemInfoWrapperFactory, bool showNetwork, string rootDirPath = "")
Parameters
FileSystemInfoWrapperFactoryBase fileSystemInfoWrapperFactory

The FileSystemInfoWrapperFactoryBase used for creating FileSystemInfoWrappers.

System.Boolean showNetwork

Boolean indicating whether network locations are shown.

System.String rootDirPath

The path of the initial directory.

Properties

CurrentFileSystemObjects

Gets the currently visible FileSystemInfoWrappers.

Declaration
public BindingList<FileSystemInfoWrapper> CurrentFileSystemObjects { get; }
Property Value
System.ComponentModel.BindingList<FileSystemInfoWrapper>

CurrentParentDirectory

Gets the currently drilled directory.

Declaration
public DirectoryBaseWrapper CurrentParentDirectory { get; set; }
Property Value
DirectoryBaseWrapper

Implements
ICurrentDirectoryViewModel.CurrentParentDirectory

CurrentSearchResults

Collection of search results. We do not use ViewModels CurrentFileSystemObjects in order to be process the results in background successfully.

Declaration
public BindingList<FileSystemInfoWrapper> CurrentSearchResults { get; }
Property Value
System.ComponentModel.BindingList<FileSystemInfoWrapper>

CustomPlaces

Gets or sets the collection of custom places.

Declaration
public IEnumerable<DirectoryInfoWrapper> CustomPlaces { get; set; }
Property Value
System.Collections.Generic.IEnumerable<DirectoryInfoWrapper>

Implements
IDialogViewModel.CustomPlaces

EditingOptions

Determines how the files and folders in the DialogViewModel can be edited. Note that the shell context menu and drag and drop operations are handled separately.

Declaration
public EditingOptions EditingOptions { get; set; }
Property Value
EditingOptions

FileSystemInfoWrapperFactory

Gets the FileSystemInfoWrapperFactoryBase for creating wrappers for System.IO.FileSystemInfos.

Declaration
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Property Value
FileSystemInfoWrapperFactoryBase

InitialDirectory

Gets or sets the initial directory.

Declaration
public DirectoryBaseWrapper InitialDirectory { get; set; }
Property Value
DirectoryBaseWrapper

Implements
IDialogViewModel.InitialDirectory

InvokeContext

Declaration
public static ExplorerControl InvokeContext { get; set; }
Property Value
ExplorerControl

IsDirectorySelected

Return true if the selected item is directory.

Declaration
public bool IsDirectorySelected { get; }
Property Value
System.Boolean

IsMainPaneLoadingNetwork

Used to trigger a busy indicator while network location is being loaded for the main pane.

Declaration
public bool IsMainPaneLoadingNetwork { get; set; }
Property Value
System.Boolean

IsSearchViewActive

Gets or sets the IsSearchViewActive. When true, it indicates the Dialog's Main Pane shows results from search operation.

Declaration
public bool IsSearchViewActive { get; set; }
Property Value
System.Boolean

Layouts

Gets the available layouts for the dialog explorer.

Declaration
public virtual IEnumerable<LayoutConfigurationModel> Layouts { get; }
Property Value
System.Collections.Generic.IEnumerable<LayoutConfigurationModel>

Implements
IDialogViewModel.Layouts

MainNavigationRoot

Gets the main root DirectoryInfoWrapper used for folder navigation.

Declaration
public DirectoryBaseWrapper MainNavigationRoot { get; }
Property Value
DirectoryBaseWrapper

MainNavigationRootSource

Gets the root DirectoryInfoWrapper used for folder navigation.

Declaration
public ObservableCollection<DirectoryBaseWrapper> MainNavigationRootSource { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<DirectoryBaseWrapper>

Name

Gets or sets a string representing the full path to the current file system object.

Declaration
public string Name { get; set; }
Property Value
System.String

Implements
IDialogViewModel.Name

Path

Gets a string representing the path to the current folder.

Declaration
public string Path { get; }
Property Value
System.String

Implements
IDialogViewModel.Path

RootAndCurrentFileSystemObjects

Gets the currently root and current visible FileSystemInfoWrappers.

Declaration
public BindingList<FileSystemInfoWrapper> RootAndCurrentFileSystemObjects { get; }
Property Value
System.ComponentModel.BindingList<FileSystemInfoWrapper>

SelectedFilesInvoker

Declaration
public IInvokeSelectedFileSystemObjects SelectedFilesInvoker { get; set; }
Property Value
IInvokeSelectedFileSystemObjects

SelectedFileSystemObject

Gets the currently selected file or folder.

Declaration
public FileSystemInfoWrapper SelectedFileSystemObject { get; set; }
Property Value
FileSystemInfoWrapper

Implements
ICurrentDirectoryViewModel.SelectedFileSystemObject

SelectedLayout

Gets the selected LayoutConfigurationModel.

Declaration
public LayoutConfigurationModel SelectedLayout { get; set; }
Property Value
LayoutConfigurationModel

Implements
IDialogViewModel.SelectedLayout

ShowHiddenFiles

Gets or sets a boolean value indicating whether the dialog shows hidden files and folders.

Declaration
public bool ShowHiddenFiles { get; set; }
Property Value
System.Boolean

Implements
IDialogViewModel.ShowHiddenFiles

Methods

CanCopyExecute()

Declaration
protected virtual bool CanCopyExecute()
Returns
System.Boolean

CanCutExecute()

Declaration
protected virtual bool CanCutExecute()
Returns
System.Boolean

CanDeleteExecute()

Declaration
protected virtual bool CanDeleteExecute()
Returns
System.Boolean

CanEditExecute()

Declaration
protected virtual bool CanEditExecute()
Returns
System.Boolean

CanExecuteAccept()

Defines the method that determines whether the accept command can execute in its current state.

Declaration
protected virtual bool CanExecuteAccept()
Returns
System.Boolean

CanExecuteHelper()

Declaration
protected virtual bool CanExecuteHelper()
Returns
System.Boolean

CanNewFolderExecute()

Declaration
protected virtual bool CanNewFolderExecute()
Returns
System.Boolean

CanPasteExecute()

Declaration
protected virtual bool CanPasteExecute()
Returns
System.Boolean

CreateNewChildFolder()

Creates new child folder in the CurrentParentDirectory.

Declaration
public bool CreateNewChildFolder()
Returns
System.Boolean

Implements
ICurrentDirectoryViewModel.CreateNewChildFolder()

Dispose(Boolean)

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

Overrides
ViewModelBase.Dispose(Boolean)

GetCurrentFileSystemInfoWrappers(DirectoryBaseWrapper)

Gets the current visible FileSystemInfoWrappers.

Declaration
protected abstract IEnumerable<FileSystemInfoWrapper> GetCurrentFileSystemInfoWrappers(DirectoryBaseWrapper parent)
Parameters
DirectoryBaseWrapper parent

Returns
System.Collections.Generic.IEnumerable<FileSystemInfoWrapper>

InvokeSelectedFileSystemObjects()

Execute logic when accept is executed for the selected FileSystemInfoWrappers.

Declaration
protected virtual void InvokeSelectedFileSystemObjects()

OnCopyCommand(IntPtr)

Declaration
protected virtual void OnCopyCommand(IntPtr controlHandle)
Parameters
System.IntPtr controlHandle

OnCurrentSearchResultsChanged()

Declaration
public void OnCurrentSearchResultsChanged()

OnCutCommand(IntPtr)

Declaration
protected virtual void OnCutCommand(IntPtr controlHandle)
Parameters
System.IntPtr controlHandle

OnDeleteCommand(IntPtr)

Declaration
protected virtual void OnDeleteCommand(IntPtr controlHandle)
Parameters
System.IntPtr controlHandle

OnEditExecuted()

Declaration
protected virtual void OnEditExecuted()

OnNewFolderExecuted()

Declaration
protected virtual void OnNewFolderExecuted()

OnPasteCommand(IntPtr)

Declaration
protected virtual void OnPasteCommand(IntPtr controlHandle)
Parameters
System.IntPtr controlHandle

OnPropertyChanging(String)

Declaration
protected virtual void OnPropertyChanging(string propertyName)
Parameters
System.String propertyName

OnSelectionChanged()

Notifies when the SelectedFileSystemObject changes.

Declaration
protected virtual void OnSelectionChanged()

PrepareCommandAndExecute(IntPtr, ShellContextMenuCommand)

Declaration
protected virtual void PrepareCommandAndExecute(IntPtr controlHandle, ShellContextMenuCommand command)
Parameters
System.IntPtr controlHandle

ShellContextMenuCommand command

ResetSelection()

Resets the selection.

Declaration
protected virtual void ResetSelection()

ShouldCancelDiretoryNavigating(String)

Declaration
protected virtual bool ShouldCancelDiretoryNavigating(string newDir)
Parameters
System.String newDir

Returns
System.Boolean

Events

DirectoryNavigating

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

PropertyChanging

Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Type
System.ComponentModel.PropertyChangingEventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • 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.