Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight 3
Collapse All/Expand All Collapse All
.NET Framework Class Library for Silverlight
OpenFileDialog Class

Provides a dialog box that enables the user to select one or more files.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public NotInheritable Class OpenFileDialog
Visual Basic (Usage)
Dim instance As OpenFileDialog
C#
public sealed class OpenFileDialog

This class lets you do the following tasks:

  • Enable users to select one or more files on the local computer or on a networked computer.

  • Filter the file types shown in the dialog box.

  • Specify which filter is used when the dialog box is first displayed.

You cannot specify an initial folder for the OpenFileDialog. The first time the OpenFileDialog is displayed for an application, the initial folder is based on the user's settings. Additional displays of the OpenFileDialog for an application use the folder of the last selected file.

NoteNote:

Silverlight does not have a browse folder dialog box and you cannot use the OpenFileDialog to just select a folder.

NoteNote:

The Silverlight plug-in does not support OpenFileDialog in full-screen mode. In most cases, displaying this dialog box in full-screen mode will cause the plug-in to revert to embedded mode. To avoid issues on some browsers, you should exit full-screen mode before using this class. For more information, see Full-Screen Support.

System..::.Object
  System.Windows.Controls..::.OpenFileDialog
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker