ClassDialogViewModel
Base class for the different file dialogs.
Definition
Namespace:Telerik.WinControls.FileDialogs
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class DialogViewModel : ViewModelBase, INotifyPropertyChanged, IDisposable, IDialogViewModel, ICurrentDirectoryViewModel, INotifyPropertyChanging
Inheritance: objectViewModelBaseDialogViewModel
Derived Classes:
Implements:
Inherited Members
Constructors
DialogViewModel(FileSystemInfoWrapperFactoryBase, bool, string)
Initializes a new instance of the DialogViewModel class.
Declaration
protected DialogViewModel(FileSystemInfoWrapperFactoryBase fileSystemInfoWrapperFactory, bool showNetwork, string rootDirPath = "")
Parameters
fileSystemInfoWrapperFactory
FileSystemInfoWrapperFactoryBase
The FileSystemInfoWrapperFactoryBase used for creating FileSystemInfoWrappers.
showNetwork
Boolean indicating whether network locations are shown.
rootDirPath
The path of the initial directory.
Properties
CurrentFileSystemObjects
Gets the currently visible FileSystemInfoWrappers.
Declaration
public BindingList<FileSystemInfoWrapper> CurrentFileSystemObjects { get; }
Property Value
CurrentParentDirectory
Gets the currently drilled directory.
Declaration
public DirectoryBaseWrapper CurrentParentDirectory { get; set; }
Property Value
Implements
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
CustomPlaces
Gets or sets the collection of custom places.
Declaration
public IEnumerable<DirectoryInfoWrapper> CustomPlaces { get; set; }
Property Value
IEnumerable<DirectoryInfoWrapper>
Implements
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
FileSystemInfoWrapperFactory
Gets the FileSystemInfoWrapperFactoryBase for creating wrappers for FileSystemInfos.
Declaration
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Property Value
InitialDirectory
Gets or sets the initial directory.
Declaration
public DirectoryBaseWrapper InitialDirectory { get; set; }
Property Value
Implements
InvokeContext
Declaration
public static ExplorerControl InvokeContext { get; set; }
Property Value
IsDirectorySelected
Return true if the selected item is directory.
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
IsSearchViewActive
Gets or sets the IsSearchViewActive. When true, it indicates the Dialog's Main Pane shows results from search operation.
Layouts
Gets the available layouts for the dialog explorer.
Declaration
public virtual IEnumerable<LayoutConfigurationModel> Layouts { get; }
Property Value
IEnumerable<LayoutConfigurationModel>
Implements
MainNavigationRoot
Gets the main root DirectoryInfoWrapper used for folder navigation.
Declaration
public DirectoryBaseWrapper MainNavigationRoot { get; }
Property Value
MainNavigationRootSource
Gets the root DirectoryInfoWrapper used for folder navigation.
Declaration
public ObservableCollection<DirectoryBaseWrapper> MainNavigationRootSource { get; }
Property Value
Name
Gets or sets a string representing the full path to the current file system object.
Path
Gets a string representing the path to the current folder.
RootAndCurrentFileSystemObjects
Gets the currently root and current visible FileSystemInfoWrappers.
Declaration
public BindingList<FileSystemInfoWrapper> RootAndCurrentFileSystemObjects { get; }
Property Value
SelectedFileSystemObject
Gets the currently selected file or folder.
Declaration
public FileSystemInfoWrapper SelectedFileSystemObject { get; set; }
Property Value
Implements
SelectedFilesInvoker
Declaration
public IInvokeSelectedFileSystemObjects SelectedFilesInvoker { get; set; }
Property Value
SelectedLayout
Gets the selected LayoutConfigurationModel.
Declaration
public LayoutConfigurationModel SelectedLayout { get; set; }
Property Value
Implements
ShowHiddenFiles
Gets or sets a boolean value indicating whether the dialog shows hidden files and folders.
Declaration
public bool ShowHiddenFiles { get; set; }
Property Value
Implements
Methods
CanExecuteAccept()
Defines the method that determines whether the accept command can execute in its current state.
CreateNewChildFolder()
Creates new child folder in the CurrentParentDirectory.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources.
false to release only unmanaged resources.
Overrides
GetCurrentFileSystemInfoWrappers(DirectoryBaseWrapper)
Gets the current visible FileSystemInfoWrappers.
Declaration
protected abstract IEnumerable<FileSystemInfoWrapper> GetCurrentFileSystemInfoWrappers(DirectoryBaseWrapper parent)
Parameters
parent
Returns
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
controlHandle
OnCurrentSearchResultsChanged()
Declaration
public void OnCurrentSearchResultsChanged()
OnCutCommand(IntPtr)
Declaration
protected virtual void OnCutCommand(IntPtr controlHandle)
Parameters
controlHandle
OnDeleteCommand(IntPtr)
Declaration
protected virtual void OnDeleteCommand(IntPtr controlHandle)
Parameters
controlHandle
OnEditExecuted()
Declaration
protected virtual void OnEditExecuted()
OnNewFolderExecuted()
Declaration
protected virtual void OnNewFolderExecuted()
OnPasteCommand(IntPtr)
Declaration
protected virtual void OnPasteCommand(IntPtr controlHandle)
Parameters
controlHandle
OnPropertyChanging(string)
Declaration
protected virtual void OnPropertyChanging(string propertyName)
Parameters
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
controlHandle
command
ShellContextMenuCommand
ResetSelection()
Resets the selection.
Declaration
protected virtual void ResetSelection()
Events
DirectoryNavigating
Declaration
public event EventHandler<DirectoryNavigatingEventArgs> DirectoryNavigating
Event Value
PropertyChanging
Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Value
Implements