DialogViewModel
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
Initializes a new instance of the DialogViewModel class.
protected DialogViewModel(FileSystemInfoWrapperFactoryBase fileSystemInfoWrapperFactory, bool showNetwork, string rootDirPath = "")
The FileSystemInfoWrapperFactoryBase used for creating FileSystemInfoWrappers.
showNetworkboolBoolean indicating whether network locations are shown.
rootDirPathstringThe path of the initial directory.
Properties
Gets the currently visible FileSystemInfoWrappers.
public BindingList<FileSystemInfoWrapper> CurrentFileSystemObjects { get; }
Gets the currently drilled directory.
public DirectoryBaseWrapper CurrentParentDirectory { get; set; }
Implements:
Collection of search results. We do not use ViewModels CurrentFileSystemObjects in order to be process the results in background successfully.
public BindingList<FileSystemInfoWrapper> CurrentSearchResults { get; }
CustomPlaces
IEnumerable<DirectoryInfoWrapper>
Gets or sets the collection of custom places.
public IEnumerable<DirectoryInfoWrapper> CustomPlaces { get; set; }
Implements:
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.
public EditingOptions EditingOptions { get; set; }
Gets the FileSystemInfoWrapperFactoryBase for creating wrappers for FileSystemInfos.
protected FileSystemInfoWrapperFactoryBase FileSystemInfoWrapperFactory { get; }
Gets or sets the initial directory.
public DirectoryBaseWrapper InitialDirectory { get; set; }
Implements:
public static ExplorerControl InvokeContext { get; set; }
Return true if the selected item is directory.
public bool IsDirectorySelected { get; }
Used to trigger a busy indicator while network location is being loaded for the main pane.
public bool IsMainPaneLoadingNetwork { get; set; }
Gets or sets the IsSearchViewActive. When true, it indicates the Dialog's Main Pane shows results from search operation.
public bool IsSearchViewActive { get; set; }
Layouts
IEnumerable<LayoutConfigurationModel>
Gets the available layouts for the dialog explorer.
public virtual IEnumerable<LayoutConfigurationModel> Layouts { get; }
Implements:
Gets the main root DirectoryInfoWrapper used for folder navigation.
public DirectoryBaseWrapper MainNavigationRoot { get; }
Gets the root DirectoryInfoWrapper used for folder navigation.
public ObservableCollection<DirectoryBaseWrapper> MainNavigationRootSource { get; }
Gets or sets a string representing the full path to the current file system object.
public string Name { get; set; }
Implements:
Gets a string representing the path to the current folder.
public string Path { get; }
Implements:
Gets the currently root and current visible FileSystemInfoWrappers.
public BindingList<FileSystemInfoWrapper> RootAndCurrentFileSystemObjects { get; }
public IInvokeSelectedFileSystemObjects SelectedFilesInvoker { get; set; }
Gets the currently selected file or folder.
public FileSystemInfoWrapper SelectedFileSystemObject { get; set; }
Implements:
Gets the selected LayoutConfigurationModel.
public LayoutConfigurationModel SelectedLayout { get; set; }
Implements:
Gets or sets a boolean value indicating whether the dialog shows hidden files and folders.
public bool ShowHiddenFiles { get; set; }
Implements:
Methods
Defines the method that determines whether the accept command can execute in its current state.
Creates new child folder in the CurrentParentDirectory.
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)
true to release both managed and unmanaged resources.
false to release only unmanaged resources.
Overrides:
Gets the current visible FileSystemInfoWrappers.
protected abstract IEnumerable<FileSystemInfoWrapper> GetCurrentFileSystemInfoWrappers(DirectoryBaseWrapper parent)
IEnumerable<FileSystemInfoWrapper>
Execute logic when accept is executed for the selected FileSystemInfoWrappers.
protected virtual void InvokeSelectedFileSystemObjects()
public void OnCurrentSearchResultsChanged()
protected virtual void OnEditExecuted()
protected virtual void OnNewFolderExecuted()
Notifies when the SelectedFileSystemObject changes.
protected virtual void OnSelectionChanged()
protected virtual void PrepareCommandAndExecute(IntPtr controlHandle, ShellContextMenuCommand command)
Resets the selection.
protected virtual void ResetSelection()
Events
public event EventHandler<DirectoryNavigatingEventArgs> DirectoryNavigating
public event PropertyChangingEventHandler PropertyChanging
Implements: