Hello,
I use CommonOpenFileDialog to make possible the choice of a folder but the window is not modal, it is possible to swith another window and run actions and I do not want that.
I would like that CommonOpenFileDialog is a modal window, in other word, not possible to swith another window.
Here is my code:
- public static void ChooseFolder(TextBox textbox)
- {
- CommonOpenFileDialog openFolder = new CommonOpenFileDialog();
- openFolder.InitialDirectory = textbox.Text;
- openFolder.AllowNonFileSystemItems = true;
- openFolder.Multiselect = false;
- openFolder.IsFolderPicker = true;
- openFolder.Title = "Select folder";
- if (openFolder.ShowDialog() == CommonFileDialogResult.Ok)
- {
- textbox.Text = openFolder.FileName;
- }
- }
- }
How to solve this issue?
Thanks.