/// <summary> /// Executes the FileOkCommand using the current FileName property. Marked as virtual so it can be overridden in /// DependencyOpenFileDialog. Not happy with this situation. /// </summary> protected virtual void ExecuteFileOkCommand() { if (FileOkCommand != null) { FileOkCommand.Execute(Dialog.FileName); } }
/// <summary> /// Overridden from DependencyFileDialog. Provides support for the MultiSelect property. Smells fragile. /// </summary> protected override void ExecuteFileOkCommand() { if (MultiSelect) { FileOkCommand.Execute(Dialog.FileNames); } else { base.ExecuteFileOkCommand(); } }
public FileDialogServiceBase() { FileDialog = CreateFileDialog(); FilesCore = new List <FileInfoWrapper>(); #if !SILVERLIGHT FileOk += (d, e) => { if (FileOkCommand != null && FileOkCommand.CanExecute(e)) { FileOkCommand.Execute(e); } }; HelpRequest += (d, e) => { if (HelpRequestCommand != null && HelpRequestCommand.CanExecute(e)) { HelpRequestCommand.Execute(e); } }; #endif }