You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MessageBox.Show(this,"Because you are not using Windows Vista or later, the regular folder browser dialog will be used. Please use Windows Vista to see the new dialog.","Sample folder browser dialog");
MessageBox.Show(this,"Because you are not using Windows Vista or later, the regular folder browser dialog will be used. Please use Windows Vista to see the new dialog.","Sample folder browser dialog");
Copy file name to clipboardExpand all lines: src/Ookii.Dialogs.Wpf/VistaFolderBrowserDialog.cs
+115-7Lines changed: 115 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
usingSystem.Windows.Interop;
24
24
usingSystem.Windows;
25
25
usingSystem.Runtime.InteropServices;
26
+
usingSystem.Linq;
26
27
27
28
namespaceOokii.Dialogs.Wpf
28
29
{
@@ -40,6 +41,8 @@ public sealed class VistaFolderBrowserDialog
40
41
{
41
42
privatestring_description;
42
43
privatestring_selectedPath;
44
+
privateNativeMethods.FOS_options;
45
+
privatestring[]_selectedPaths;
43
46
44
47
/// <summary>
45
48
/// Creates a new instance of the <see cref="VistaFolderBrowserDialog" /> class.
@@ -108,8 +111,14 @@ public string SelectedPath
108
111
{
109
112
get
110
113
{
111
-
return_selectedPath??string.Empty;
114
+
varselectedPath=
115
+
_selectedPath??
116
+
_selectedPaths?.FirstOrDefault()??
117
+
string.Empty;
118
+
119
+
returnselectedPath;
112
120
}
121
+
113
122
set
114
123
{
115
124
_selectedPath=value;
@@ -135,6 +144,63 @@ public string SelectedPath
135
144
[Category("Folder Browsing"),DefaultValue(false),Description("A value that indicates whether to use the value of the Description property as the dialog title for Vista style dialogs. This property has no effect on old style dialogs.")]
136
145
publicboolUseDescriptionForTitle{get;set;}
137
146
147
+
/// <summary>
148
+
/// Gets or sets a value indicating whether the dialog box allows multiple folder to be selected.
149
+
/// </summary>
150
+
/// <value>
151
+
/// <see langword="true" /> if the dialog box allows multiple folder to be selected together or concurrently; otherwise, <see langword="false" />.
152
+
/// The default value is <see langword="false" />.
153
+
/// </value>
154
+
[Description("A value indicating whether the dialog box allows multiple folders to be selected."),DefaultValue(false),Category("Behavior")]
/// Gets the folder paths of all selected folder in the dialog box.
170
+
/// </summary>
171
+
/// <value>
172
+
/// An array of type <see cref="string"/>, containing the folder paths of all selected folder in the dialog box.
173
+
/// </value>
174
+
[Description("The folder path of all selected folder in the dialog box."),Browsable(false),DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
0 commit comments