The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FileDialog Members

An abstract base class that encapsulates functionality that is common to file dialogs, including OpenFileDialog and SaveFileDialog.

The following tables list the members exposed by the FileDialog type.

  Name Description
Protected method FileDialog Initializes a new instance of the FileDialog class.

(see also Protected Properties )
  Name Description
Public property AddExtension Gets or sets a value indicating whether a file dialog automatically adds an extension to a filename if the user omits an extension.
Public property CheckFileExists Gets or sets a value indicating whether a file dialog displays a warning if the user specifies a filename that does not exist.
Public property CheckPathExists Gets or sets a value that specifies whether warnings are displayed if the user types invalid paths and filenames.
Public property DefaultExt Gets or sets a value that specifies the default extension string to use to filter the list of files that are displayed.
Public property DereferenceLinks Gets or sets a value indicating whether a file dialog returns either the location of the file referenced by a shortcut or the location of the shortcut file (.lnk).
Public property FileName Gets or sets a string containing the full path of the file selected in a file dialog.
Public property FileNames Gets an array that contains one filename for each selected file.
Public property Filter Gets or sets the current filename filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box at the bottom of a file dialog.
Public property FilterIndex Gets or sets the index of the filter currently selected in a file dialog.
Public property InitialDirectory Gets or sets the initial directory that is displayed by a file dialog.
Public property RestoreDirectory Gets or sets a value that causes a file dialog to restore its current directory to the original value before a user changes directory to search for files.
Public property SafeFileName Gets a string that only contains the filename for the selected file.
Public property SafeFileNames Gets an array that contains one safe file name for each selected file.
Public property Tag  Gets or sets an object associated with the dialog. This provides the ability to attach an arbitrary object to the dialog.(inherited from CommonDialog)
Public property Title Gets or sets the text that appears in the title bar of a file dialog.
Public property ValidateNames Gets or sets a value indicating whether the dialog accepts only valid Win32 filenames.

  Name Description
Protected property Options Gets the Win32 common file dialog flags that are used by file dialogs for initialization.

(see also Protected Methods )
  Name Description
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Reset Overridden. Sets all properties of a file dialog back to their initial values.
Public method ShowDialog  Overloaded. Displays a common dialog. (inherited from CommonDialog)
Public method ToString Overridden. Returns a string that represents a file dialog.

  Name Description
Protected method CheckPermissionsToShowDialog  Determines whether sufficient permissions for displaying a dialog exist. (inherited from CommonDialog)
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method HookProc Overridden. Defines the common file dialog hook procedure that is overridden to add common functionality to a file dialog.
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Protected method OnFileOk Raises the FileOk event.
Protected method RunDialog Overridden. RunDialog is called to display a file dialog in a derived class, such as OpenFileDialog and SaveFileDialog.

  Name Description
Public event FileOk Occurs when the user selects a filename by either clicking the Open button of the OpenFileDialog or the Save button of the SaveFileDialog.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft