Show / Hide Table of Contents

# Class FileDialog

Base class for the OpenDialog and the SaveDialog

##### Inheritance

System.Object
Responder
View
Toplevel
Window
Dialog
FileDialog
OpenDialog
SaveDialog

##### Inherited Members

Dialog.AddButton(Button)
Dialog.LayoutSubviews()
Dialog.ProcessKey(KeyEvent)
Toplevel.CanFocus
Toplevel.Create()
Toplevel.Running
View.Add(View[])
View.AddRune(Int32, Int32, Rune)
View.Bounds
View.ChildNeedsDisplay()
View.Clear()
View.Clear(Rect)
View.ClearNeedsDisplay()
View.ClipToBounds()
View.ColorScheme
View.DrawFrame(Rect, Int32, Boolean)
View.DrawHotString(ustring, Boolean, ColorScheme)
View.DrawHotString(ustring, Attribute, Attribute)
View.Driver
View.EnsureFocus()
View.Focused
View.FocusFirst()
View.FocusLast()
View.FocusNext()
View.FocusPrev()
View.Frame
View.HasFocus
View.Height
View.Id
View.LayoutStyle
View.MostFocused
View.Move(Int32, Int32)
View.PositionCursor()
View.ProcessColdKey(KeyEvent)
View.ProcessHotKey(KeyEvent)
View.ScreenToView(Int32, Int32)
View.SetClip(Rect)
View.SetFocus(View)
View.SetNeedsDisplay()
View.SetNeedsDisplay(Rect)
View.Subviews
View.SuperView
View.ToString()
View.WantMousePositionReports
View.Width
View.X
View.Y
Window.Add(View)
Window.GetEnumerator()
Window.MouseEvent(MouseEvent)
Window.Redraw(Rect)
Window.Remove(View)
Window.RemoveAll()
Window.Title

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public class FileDialog : Terminal.Gui.Dialog

### Constructors

#### FileDialog(ustring, ustring, ustring, ustring)

##### Declaration

    public FileDialog (NStack.ustring title, NStack.ustring prompt, NStack.ustring nameFieldLabel, NStack.ustring message);

##### Parameters

Type | Name | Description
--- | --- | ---
NStack.ustring | title | To be added.
NStack.ustring | prompt | To be added.
NStack.ustring | nameFieldLabel | To be added.
NStack.ustring | message | To be added.

### 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`.

#### 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 NStack.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 NStack.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 NStack.ustring Message { get; set; }

##### Property Value

Type | Description
--- | ---
NStack.ustring | The message.

#### NameFieldLabel

Gets or sets the name field label.

##### Declaration

    public NStack.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 NStack.ustring Prompt { get; set; }

##### Property Value

Type | Description
--- | ---
NStack.ustring | The prompt.

### Methods

#### WillPresent()

##### Declaration

    public override void WillPresent ();