New to Telerik UI for WinFormsStart a free 30-day trial

Provides a view model for setup and configuration of RadOpenFileDialog.

Definition

Namespace:Telerik.WinControls.FileDialogs

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class OpenFileDialogViewModel : FileDialogViewModel, INotifyPropertyChanged, IDisposable, IDialogViewModel, ICurrentDirectoryViewModel, INotifyPropertyChanging, IFileFilterableModel, IFileExtensionFilterable, IMultiSelectable

Inheritance: objectViewModelBaseDialogViewModelFileDialogViewModelOpenFileDialogViewModel

Implements: ICurrentDirectoryViewModelIDialogViewModelIDisposableIFileExtensionFilterableIFileFilterableModelIMultiSelectableINotifyPropertyChangedINotifyPropertyChanging...

Inherited Members FileDialogViewModel.GetCurrentFileSystemInfoWrappers(DirectoryBaseWrapper)FileDialogViewModel.FilterIndexFileDialogViewModel.DefaultExtFileDialogViewModel.FilterFileDialogViewModel.IsFilterAppliedFileDialogViewModel.FilterDescriptorsFileDialogViewModel.SelectedFilterNameFileDialogViewModel.IsSearchActiveDialogViewModel.Dispose(bool)DialogViewModel.OnCurrentSearchResultsChanged()DialogViewModel.CreateNewChildFolder()DialogViewModel.CanEditExecute()DialogViewModel.OnEditExecuted()DialogViewModel.CanNewFolderExecute()DialogViewModel.OnNewFolderExecuted()DialogViewModel.CanCopyExecute()DialogViewModel.OnCopyCommand(IntPtr)DialogViewModel.CanCutExecute()DialogViewModel.OnCutCommand(IntPtr)DialogViewModel.CanPasteExecute()DialogViewModel.OnPasteCommand(IntPtr)DialogViewModel.CanDeleteExecute()DialogViewModel.OnDeleteCommand(IntPtr)DialogViewModel.CanExecuteHelper()DialogViewModel.PrepareCommandAndExecute(IntPtr, ShellContextMenuCommand)DialogViewModel.InvokeSelectedFileSystemObjects()DialogViewModel.OnSelectionChanged()DialogViewModel.OnPropertyChanging(string)DialogViewModel.ShouldCancelDiretoryNavigating(string)DialogViewModel.InvokeContextDialogViewModel.MainNavigationRootDialogViewModel.MainNavigationRootSourceDialogViewModel.EditingOptionsDialogViewModel.PathDialogViewModel.NameDialogViewModel.ShowHiddenFilesDialogViewModel.InitialDirectoryDialogViewModel.CurrentParentDirectoryDialogViewModel.SelectedFileSystemObjectDialogViewModel.CurrentFileSystemObjectsDialogViewModel.RootAndCurrentFileSystemObjectsDialogViewModel.IsDirectorySelectedDialogViewModel.CustomPlacesDialogViewModel.SelectedLayoutDialogViewModel.LayoutsDialogViewModel.IsMainPaneLoadingNetworkDialogViewModel.SelectedFilesInvokerDialogViewModel.FileSystemInfoWrapperFactoryDialogViewModel.CurrentSearchResultsDialogViewModel.IsSearchViewActiveDialogViewModel.DirectoryNavigatingDialogViewModel.PropertyChangingViewModelBase.Dispose()ViewModelBase.InvokeOnUIThread(Action)ViewModelBase.VerifyPropertyName(string)ViewModelBase.PropertyChanged...

Constructors

Initializes a new instance of the OpenFileDialogViewModel class.

C#
public OpenFileDialogViewModel(FileSystemInfoWrapperFactoryBase fileSystemInfoWrapperFactory, bool showNetwork, string rootDirPath = "")
Parameters:fileSystemInfoWrapperFactoryFileSystemInfoWrapperFactoryBase

The factory used from this OpenFileDialogViewModel for creation of file system wrappers.

showNetworkbool

Boolean indicating whether network locations are shown.

rootDirPathstring

The path of the initial directory.

Properties

Gets or sets a value indicating whether a file dialog returns either the location of the file referenced by a shortcut or the location of the shortcut file.

C#
public bool DereferenceLinks { get; set; }

Gets or sets a value indicating whether multiple selection of files or folders is allowed.

C#
public bool MultiSelect { get; set; }

Implements: IMultiSelectable.MultiSelect

Gets or sets a value indicating whether the read-only check box is selected.

C#
public bool ReadOnlyChecked { get; set; }

Gets a collection of selected FileSystemInfoWrappers.

C#
public ObservableCollection<FileSystemInfoWrapper> SelectedFileSystemInfoWrappers { get; }

Implements: IMultiSelectable.SelectedFileSystemInfoWrappers

Gets or sets a value indicating whether the dialog contains a read-only check box.

C#
public bool ShowReadOnly { get; set; }

Methods

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

C#
protected override bool CanExecuteAccept()
Returns:

bool

Overrides: DialogViewModel.CanExecuteAccept()

Raises this object's PropertyChanged event.

C#
protected override void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

The property that has a new value.

Overrides: ViewModelBase.OnPropertyChanged(string)

Resets the selection.

C#
protected override void ResetSelection()

Overrides: DialogViewModel.ResetSelection()