SaveFileDialog.DefaultExt Property (System.Windows.Controls)

Switch View :
ScriptFree
.NET Framework Class Library for Silverlight
SaveFileDialog.DefaultExt Property

Gets or sets the default file name extension applied to files that are saved with the SaveFileDialog.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
Syntax

Visual Basic (Declaration)
Public Property DefaultExt As String
C#
public string DefaultExt { get; set; }

Property Value

Type: System.String
The default file name extension applied to files that are saved with the SaveFileDialog, which can optionally include the dot character (.).
Remarks

The default file name extension is applied when the selected filter does not specify an extension (or the Filter property is not set) and the user does not specify an extension. For example, if the DefaultExt property is set to .my, the selected item in the Save as type drop-down list has a filter string set to All Files|*.*, and a file name without a extension is specified in the File name box, the file is saved with the .my extension.

Version Information

Silverlight

Supported in: 5, 4, 3
Platforms

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

See Also

Reference