Table of Contents

Class SelectFileEditorAttribute

Namespace
OFT.Attributes.Editors
Assembly
OFT.Attributes.dll

Edits a string setting as a file path with a button that opens a file dialog.

[AttributeUsage(AttributeTargets.Property)]
public class SelectFileEditorAttribute : Attribute
Inheritance
object
Attribute
SelectFileEditorAttribute
Extension Methods

Constructors

SelectFileEditorAttribute()

Initializes an editor for opening any file.

public SelectFileEditorAttribute()

SelectFileEditorAttribute(SpecialFolder)

Initializes an editor whose dialog opens in a system folder.

public SelectFileEditorAttribute(Environment.SpecialFolder initialSpecialFolder)

Parameters

initialSpecialFolder Environment.SpecialFolder

The system folder the dialog opens in.

Properties

Filter

Gets or sets the file type filter of the dialog, for example Text files|.txt|All files|.*; all files by default.

public string Filter { get; set; }

Property Value

string

InitialFolder

Gets or sets the folder the dialog opens in.

public string InitialFolder { get; set; }

Property Value

string

InitialSpecialFolder

Gets the system folder the dialog opens in, when set through the constructor.

public Environment.SpecialFolder? InitialSpecialFolder { get; }

Property Value

Environment.SpecialFolder?

IsTextEditable

Gets or sets a value indicating whether the path can also be typed; true by default.

public bool IsTextEditable { get; set; }

Property Value

bool

Multiselect

Gets or sets a value indicating whether several files can be selected in the dialog.

public bool Multiselect { get; set; }

Property Value

bool

SelectFileType

Gets or sets the dialog: open a file (default) or save a file.

public SelectFileTypes SelectFileType { get; set; }

Property Value

SelectFileTypes