示例#1
0
        public void Execute(object parameter)
        {
            var dlg = new CommonOpenFileDialog
            {
                Title                     = "Selecteer locatie",
                IsFolderPicker            = true,
                InitialDirectory          = viewModel.ExportLocation,
                AddToMostRecentlyUsedList = false,
                AllowNonFileSystemItems   = false,
                DefaultDirectory          = viewModel.ExportLocation,
                EnsureFileExists          = true,
                EnsurePathExists          = true,
                EnsureReadOnly            = false,
                EnsureValidNames          = true,
                Multiselect               = false,
                ShowPlacesList            = true
            };


            if (dlg.ShowDialog() == CommonFileDialogResult.Ok)
            {
                viewModel.ExportLocation = dlg.FileName;
                viewModel.OnPropertyChanged(nameof(viewModel.ExportLocation));
            }
        }