forked from dotnet/dotnet-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenFileDialog.xml
515 lines (480 loc) · 33.5 KB
/
OpenFileDialog.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
<Type Name="OpenFileDialog" FullName="System.Windows.Forms.OpenFileDialog">
<TypeSignature Language="C#" Value="public sealed class OpenFileDialog : System.Windows.Forms.FileDialog" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit OpenFileDialog extends System.Windows.Forms.FileDialog" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.OpenFileDialog" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class OpenFileDialog
Inherits FileDialog" />
<TypeSignature Language="F#" Value="type OpenFileDialog = class
 inherit FileDialog" />
<TypeSignature Language="C++ CLI" Value="public ref class OpenFileDialog sealed : System::Windows::Forms::FileDialog" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.Forms.FileDialog</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName Language="C#">[System.ComponentModel.Designer("System.Windows.Forms.Design.OpenFileDialogDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Designer("System.Windows.Forms.Design.OpenFileDialogDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Displays a standard dialog box that prompts the user to open a file. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This class allows you to check whether a file exists and to open it. The <xref:System.Windows.Forms.OpenFileDialog.ShowReadOnly%2A> property determines whether a read-only check box appears in the dialog box. The <xref:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked%2A> property indicates whether the read-only check box is checked.
Most of the core functionality for this class is found in the <xref:System.Windows.Forms.FileDialog> class.
On a right-to-left operating system, setting the containing form's <xref:System.Windows.Forms.Control.RightToLeft> property to <xref:System.Windows.Forms.RightToLeft.Yes?displayProperty=nameWithType> localizes the dialog's **File Name**, **Open**, and **Cancel** buttons. If the property is not set to <xref:System.Windows.Forms.RightToLeft.Yes?displayProperty=nameWithType>, English text is used instead.
If you want to give the user the ability to select a folder instead of a file, use <xref:System.Windows.Forms.FolderBrowserDialog> instead.
## Examples
The following code example creates an <xref:System.Windows.Forms.OpenFileDialog>, sets several properties to define the file extension filter and dialog behavior, and displays the dialog box using the <xref:System.Windows.Forms.CommonDialog.ShowDialog%2A?displayProperty=nameWithType> method. The example requires a form with a <xref:System.Windows.Forms.Button> placed on it and a reference to the <xref:System.IO> namespace added to it.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic OpenFileDialog Example/VB/source.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.FileDialog" />
<altmember cref="T:System.Windows.Forms.CommonDialog" />
<altmember cref="T:System.Windows.Forms.SaveFileDialog" />
<related type="Article" href="/dotnet/standard/io/how-to-read-text-from-a-file">How to: Read Text from a File</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public OpenFileDialog ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.OpenFileDialog.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 OpenFileDialog();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes an instance of the <see cref="T:System.Windows.Forms.OpenFileDialog" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is the default, compiler-supplied constructor for the <xref:System.Windows.Forms.OpenFileDialog> class.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CheckFileExists">
<MemberSignature Language="C#" Value="public override bool CheckFileExists { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CheckFileExists" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.CheckFileExists" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property CheckFileExists As Boolean" />
<MemberSignature Language="F#" Value="member this.CheckFileExists : bool with get, set" Usage="System.Windows.Forms.OpenFileDialog.CheckFileExists" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property bool CheckFileExists { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the dialog box displays a warning if the user specifies a file name that does not exist.</summary>
<value>
<see langword="true" /> if the dialog box displays a warning when the user specifies a file name that does not exist; otherwise, <see langword="false" />. The default value is <see langword="true" />.</value>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Forms.OpenFileDialog.OpenFile" />
<altmember cref="P:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked" />
</Docs>
</Member>
<Member MemberName="Multiselect">
<MemberSignature Language="C#" Value="public bool Multiselect { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Multiselect" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.Multiselect" />
<MemberSignature Language="VB.NET" Value="Public Property Multiselect As Boolean" />
<MemberSignature Language="F#" Value="member this.Multiselect : bool with get, set" Usage="System.Windows.Forms.OpenFileDialog.Multiselect" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool Multiselect { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the dialog box allows multiple files to be selected.</summary>
<value>
<see langword="true" /> if the dialog box allows multiple files to be selected together or concurrently; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.FileDialog.FileNames%2A> property to access the full list of selected file names.
## Examples
The following code example allows the user to select a number of images and display them in <xref:System.Windows.Forms.PictureBox> controls on a Form. It demonstrates initializing an <xref:System.Windows.Forms.OpenFileDialog>, setting the <xref:System.Windows.Forms.FileDialog.Title%2A> and <xref:System.Windows.Forms.FileDialog.Filter%2A> properties, and allowing the user to select multiple files by setting the <xref:System.Windows.Forms.OpenFileDialog.Multiselect%2A> property to true. This code example assumes that your form already has an <xref:System.Windows.Forms.OpenFileDialog> control named `openFileDialog1`, a <xref:System.Windows.Forms.Button> named `SelectFileButton`, and a <xref:System.Windows.Forms.FlowLayoutPanel> named `flowLayoutPanel1`.
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/FileNames/Form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.OpenFileDialog.MultiSelect/VB/Form1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.FileDialog.FileNames" />
<altmember cref="P:System.Windows.Forms.FileDialog.Filter" />
</Docs>
</Member>
<Member MemberName="OpenFile">
<MemberSignature Language="C#" Value="public System.IO.Stream OpenFile ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.Stream OpenFile() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.OpenFileDialog.OpenFile" />
<MemberSignature Language="VB.NET" Value="Public Function OpenFile () As Stream" />
<MemberSignature Language="F#" Value="member this.OpenFile : unit -> System.IO.Stream" Usage="openFileDialog.OpenFile " />
<MemberSignature Language="C++ CLI" Value="public:
 System::IO::Stream ^ OpenFile();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Opens the file selected by the user, with read-only permission. The file is specified by the <see cref="P:System.Windows.Forms.FileDialog.FileName" /> property.</summary>
<returns>A <see cref="T:System.IO.Stream" /> that specifies the read-only file selected by the user.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.OpenFileDialog.OpenFile%2A> method is used to provide a facility to quickly open a file from the dialog box. The file is opened in read-only mode for security purposes. To open a file in read/write mode, you must use another method, such as <xref:System.IO.FileStream>.
## Examples
The following code example demonstrates how to use the <xref:System.Windows.Forms.OpenFileDialog.OpenFile%2A> method.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Classic OpenFileDialog Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/FileDialog/Overview/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/Classic OpenFileDialog Example/VB/source.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The file name is <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred while opening the file.</exception>
<altmember cref="T:System.IO.Stream" />
<altmember cref="P:System.Windows.Forms.OpenFileDialog.CheckFileExists" />
<altmember cref="P:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked" />
</Docs>
</Member>
<Member MemberName="ReadOnlyChecked">
<MemberSignature Language="C#" Value="public bool ReadOnlyChecked { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ReadOnlyChecked" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked" />
<MemberSignature Language="VB.NET" Value="Public Property ReadOnlyChecked As Boolean" />
<MemberSignature Language="F#" Value="member this.ReadOnlyChecked : bool with get, set" Usage="System.Windows.Forms.OpenFileDialog.ReadOnlyChecked" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool ReadOnlyChecked { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the read-only check box is selected.</summary>
<value>
<see langword="true" /> if the read-only check box is selected; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked%2A> state does not affect the read/write mode that <xref:System.Windows.Forms.OpenFileDialog.OpenFile%2A?displayProperty=nameWithType> uses to open a file selected in the dialog box. <xref:System.Windows.Forms.OpenFileDialog.OpenFile%2A> will always open the file in read-only mode.
The <xref:System.Windows.Forms.OpenFileDialog.ShowReadOnly%2A> property must be set before in order for the read-only check box to appear in the dialog box.
## Examples
The following code example demonstrates the use of the <xref:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked%2A> property. This example displays the <xref:System.Windows.Forms.OpenFileDialog> box with the <xref:System.Windows.Forms.OpenFileDialog.ShowReadOnly%2A> property set to `true`. If the user clicks the option to open the file in read-only mode, the <xref:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked%2A> property evaluates to `true`, and the <xref:System.Windows.Forms.OpenFileDialog.OpenFile%2A> method is used to open the file. Otherwise, the <xref:System.IO.FileStream> class is used to open the file in read/write mode.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DlgOpenFileReadOnly/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/OpenFileDialog/ReadOnlyChecked/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/DlgOpenFileReadOnly/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.OpenFileDialog.ShowReadOnly" />
</Docs>
</Member>
<Member MemberName="Reset">
<MemberSignature Language="C#" Value="public override void Reset ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Reset() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.OpenFileDialog.Reset" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub Reset ()" />
<MemberSignature Language="F#" Value="override this.Reset : unit -> unit" Usage="openFileDialog.Reset " />
<MemberSignature Language="C++ CLI" Value="public:
 override void Reset();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Resets all properties to their default values.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SafeFileName">
<MemberSignature Language="C#" Value="public string SafeFileName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SafeFileName" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.SafeFileName" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property SafeFileName As String" />
<MemberSignature Language="F#" Value="member this.SafeFileName : string" Usage="System.Windows.Forms.OpenFileDialog.SafeFileName" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ SafeFileName { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the file name and extension for the file selected in the dialog box. The file name does not include the path.</summary>
<value>The file name and extension for the file selected in the dialog box. The file name does not include the path. The default value is an empty string.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A safe file name (just the file name and extension without a path) can be used to improve security for applications because it does not expose path information. This property should be accessible to code running with limited trust.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SafeFileNames">
<MemberSignature Language="C#" Value="public string[] SafeFileNames { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string[] SafeFileNames" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.SafeFileNames" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property SafeFileNames As String()" />
<MemberSignature Language="F#" Value="member this.SafeFileNames : string[]" Usage="System.Windows.Forms.OpenFileDialog.SafeFileNames" />
<MemberSignature Language="C++ CLI" Value="public:
 property cli::array <System::String ^> ^ SafeFileNames { cli::array <System::String ^> ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0;windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an array of file names and extensions for all the selected files in the dialog box. The file names do not include the path.</summary>
<value>An array of file names and extensions for all the selected files in the dialog box. The file names do not include the path. If no files are selected, an empty array is returned.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A safe file name (just the file name and extension without a path) can be used to improve security for applications because it does not expose path information. This property should be accessible to code running with limited trust.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SelectReadOnly">
<MemberSignature Language="C#" Value="public bool SelectReadOnly { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool SelectReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.SelectReadOnly" />
<MemberSignature Language="VB.NET" Value="Public Property SelectReadOnly As Boolean" />
<MemberSignature Language="F#" Value="member this.SelectReadOnly : bool with get, set" Usage="System.Windows.Forms.OpenFileDialog.SelectReadOnly" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool SelectReadOnly { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(true)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the dialog box allows selection of read-only files.</summary>
<value>
<see langword="true" /> if the dialog box allows selection of read-only files; otherwise, <see langword="false" />. The default value is <see langword="true" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShowPreview">
<MemberSignature Language="C#" Value="public bool ShowPreview { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ShowPreview" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.ShowPreview" />
<MemberSignature Language="VB.NET" Value="Public Property ShowPreview As Boolean" />
<MemberSignature Language="F#" Value="member this.ShowPreview : bool with get, set" Usage="System.Windows.Forms.OpenFileDialog.ShowPreview" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool ShowPreview { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the dialog box shows a preview for selected files.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShowReadOnly">
<MemberSignature Language="C#" Value="public bool ShowReadOnly { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ShowReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.OpenFileDialog.ShowReadOnly" />
<MemberSignature Language="VB.NET" Value="Public Property ShowReadOnly As Boolean" />
<MemberSignature Language="F#" Value="member this.ShowReadOnly : bool with get, set" Usage="System.Windows.Forms.OpenFileDialog.ShowReadOnly" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool ShowReadOnly { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultValue(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultValue(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the dialog box contains a read-only check box.</summary>
<value>
<see langword="true" /> if the dialog box contains a read-only check box; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates the use of the <xref:System.Windows.Forms.OpenFileDialog.ShowReadOnly%2A> property. This example displays the <xref:System.Windows.Forms.OpenFileDialog> box with the <xref:System.Windows.Forms.OpenFileDialog.ShowReadOnly%2A> property set to `true`. If the user clicks the option to open the file in read-only mode, the <xref:System.Windows.Forms.OpenFileDialog.OpenFile%2A> method is used to open the file. Otherwise, the <xref:System.IO.FileStream> class is used to open the file in read/write mode.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/DlgOpenFileReadOnly/CPP/form1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/OpenFileDialog/ReadOnlyChecked/form1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/DlgOpenFileReadOnly/VB/form1.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.OpenFileDialog.ReadOnlyChecked" />
</Docs>
</Member>
</Members>
</Type>