Class FileDialogArgs
Encapsulates arguments for the IFileDialog.
Inheritance
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class FileDialogArgs
Constructors
View SourceFileDialogArgs()
Creates a new instance of the FileDialogArgs class.
Declaration
public FileDialogArgs()
FileDialogArgs(FileType)
Creates a new instance of the FileDialogArgs class.
Declaration
public FileDialogArgs(FileType fileType)
Parameters
Type | Name | Description |
---|---|---|
FileType | fileType | The supported FileType. |
Examples
var fileDialogArgs = new FileDialogArgs(FileType.Csv | FileType.Access);
Properties
View SourceAddExtension
Indicates whether to add the extension by default.
Declaration
public bool AddExtension { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DefaultExtension
Gets or sets the default file name extension.
Declaration
public string DefaultExtension { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DefaultFileName
Gets or sets the file name that should be used initially in the file dialog box.
Declaration
public string DefaultFileName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If this is null
or System.String.Empty the file name box will be empty when the dialog box is opened.
This can be a fully qualified file name. The current implementation sets the InitialDirectory accordingly if it has not been explicitly set. If the InitialDirectory is set to a different directory the given InitialDirectory will shown in the FileView but the DefaultFileName will be set to the given fully qualified name. You can not rely on this behavior in future implementations.
FileType
The supported FileType.
Declaration
public FileType FileType { get; set; }
Property Value
Type | Description |
---|---|
FileType |
Filter
Gets or sets the value that is used to filter the file selection by extension.
Declaration
public string Filter { get; set; }
Property Value
Type | Description |
---|---|
System.String |
InitialDirectory
Gets or sets the initial directory.
Declaration
public string InitialDirectory { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The initial directory must be valid path. Trying to set an invalid path will ignore the value completely.
MultiSelect
Indicates whether the IFileDialog allows multi selection.
Declaration
public bool MultiSelect { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |