FolderBrowseDialog - English
DescriptionThe FolderBrowseDialog supports functions to browse the filesystem and choose an folder.
How-To-Use
- Create an instance: WPF_Dialogs.Dialogs.FolderBrowseDialog f = new WPF_Dialogs.Dialogs.FolderBrowseDialog();
- Call the showDialog():
- As a normal function: f.showDialog();
- or as a function with return: WPF_Dialogs.EDialogResult result = f.showDialog();
- check the result:
- As a normal function: if(f.DialogResult == WPF_Dialogs.EDialogResult.OK) { do something }
- As a function with return:
- with variable: if(result == WPF_Dialogs.EdialogResult.OK) { do something }
- direct call: if(f.showDialog() == WPF_Dialog.EDialogResult.OK) { do something }
Features
- Version 0.1.0
- Browse fast through folders
- Get the EDialogResult
- Get the selected Path
- Version 0.1.1
- Code Optimization
- Accepts an initialPath
- in showDialog(), optional parameter: showDialog(string initialPath = "");
- set an initialPath before calling showDialog() with modifiying the property FileBrowseDialog.InitialPath
- if the initialpath-property is set and the parameter of showDialog() the parameter has priority
- if the initial-path property isn't set and the parameter of showDialog() either the "Desktop" is used
- Returns an Exception if the path doesn't exists
- the use of the Window.ShowDialog(), is no more possible
- Version 0.1.2
- Now the "Computer" will be shown, not just the drives
- A path (SelectedPath) could be give before calling, this path will be selected at start
- The Content of the Buttons can be changed with properties of FolderBrowseDialog. This should be used to change language, set graphics or sth.else.
- New Exceptions:
- If the selected path is invalid (the user has choosen "Computer" or sth.else)
- If the given SelectedPath couldn't be found starting searching by the InitialPath (under "Computer" (which is not possible as InitialPath yet) and "Desktop" all will be found)
- If the given SelectedPath doesn't exist
- Version 0.1.3
- You can now create a new folder in the dialog.
- To select the "SelectedPath" at beginning is now functionable if the "Desktop" is not the "InitialPath".
- Empty folders could be shwon or hidden.
- Although hidden folders.
- 3 new Properties, for Translating
- "Computer" can be changed with the property "TextForComputer", e.g. in "Workstation".
- "TextForNewFolder" for "New Folder" (In the Right-Click menu)
- "TextForRename" for "Rename" (In the Right-Click menu)
- "TextForDelete" for "Delete" (In the Right-Click menu)
- There is a new Right-Click menu. With this you can:
- create a new folder in the selected folder
- rename the selected folder
- delete the selected folder (of course with request)
- Additionally 2 new Exceptions:
- exception at creating folder
- exception at renaming folder, e.g. if there is a folder with the same name in the directory
Screenshots
Version 0.1.0 - 0.1.1
Version 0.1.2
Version 0.1.3 - 0.1.*