4 using System.Windows.Threading;
5 using Microsoft.WindowsAPICodePack.Dialogs;
6 using SiliconStudio.Presentation.Services;
8 namespace SiliconStudio.Presentation.Dialogs
13 : base(dispatcher, parentWindow)
15 Dialog =
new CommonOpenFileDialog { EnsurePathExists =
true };
16 OpenDlg.IsFolderPicker =
true;
20 public string Directory {
get;
private set; }
23 public string InitialDirectory {
get {
return OpenDlg.InitialDirectory; } set { OpenDlg.InitialDirectory = value.Replace(
'/',
'\\'); } }
25 private CommonOpenFileDialog OpenDlg {
get {
return (CommonOpenFileDialog)Dialog; } }
29 var result = InvokeDialog();
30 Directory = result != DialogResult.Cancel ? OpenDlg.FileName : null;
override DialogResult Show()
Display the modal dialog. This method will block until the user close the dialog. ...
DialogResult
An enum representing the result of a dialog invocation.
An interface representing a modal folder selection dialog.