Class FileDialog
Base class for the OpenDialog and the SaveDialog
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class FileDialog : Dialog, IDisposable, ISupportInitializeNotification, ISupportInitialize
Constructors
FileDialog()
Initializes a new FileDialog.
Declaration
public FileDialog()
FileDialog(ustring, ustring, ustring, ustring)
Initializes a new instance of FileDialog
Declaration
public FileDialog(ustring title, ustring prompt, ustring nameFieldLabel, ustring message)
Parameters
Type | Name | Description |
---|---|---|
NStack.ustring | title | The title. |
NStack.ustring | prompt | The prompt. |
NStack.ustring | nameFieldLabel | The name field label. |
NStack.ustring | message | The message. |
Properties
AllowedFileTypes
The array of filename extensions allowed, or null if all file extensions are allowed.
Declaration
public string[] AllowedFileTypes { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | The allowed file types. |
AllowsOtherFileTypes
Gets or sets a value indicating whether this FileDialog allows the file to be saved with a different extension
Declaration
public bool AllowsOtherFileTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if allows other file types; otherwise, false . |
Canceled
Check if the dialog was or not canceled.
Declaration
public bool Canceled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CanCreateDirectories
Gets or sets a value indicating whether this FileDialog can create directories.
Declaration
public bool CanCreateDirectories { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if can create directories; otherwise, false . |
DirectoryPath
Gets or sets the directory path for this panel
Declaration
public ustring DirectoryPath { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring | The directory path. |
FilePath
The File path that is currently shown on the panel
Declaration
public ustring FilePath { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring | The absolute file path for the file path entered. |
IsExtensionHidden
Gets or sets a value indicating whether this FileDialog is extension hidden.
Declaration
public bool IsExtensionHidden { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if is extension hidden; otherwise, false . |
Message
Gets or sets the message displayed to the user, defaults to nothing
Declaration
public ustring Message { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring | The message. |
NameFieldLabel
Gets or sets the name field label.
Declaration
public ustring NameFieldLabel { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring | The name field label. |
Prompt
Gets or sets the prompt label for the Button displayed to the user
Declaration
public ustring Prompt { get; set; }
Property Value
Type | Description |
---|---|
NStack.ustring | The prompt. |
Methods
WillPresent()
Invoked by Begin(Toplevel) as part of the Run(Toplevel) after
the views have been laid out, and before the views are drawn for the first time.
Declaration
public override void WillPresent()
Overrides
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize