Skip to content

OpenFileDialog.Filter

property · OpenFileDialog · cAlgo.API Since 5.1

DesktopCLICloud

Gets or sets the filter string that determines what types of files are displayed in file dialog.

Environment behaviour

CLI — not supported. No dialog can be shown in the CLI: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.

Cloud — not supported. No dialog can be shown in the cloud: ShowDialog returns FileDialogResult.None and the dialog settings are only stored.

Definition

public string Filter {get; set;}
openFileDialog.Filter: str

Returns string

Examples

var openFileDialog = new OpenFileDialog { Filter = "CSV files (*.csv)|*.csv|All files (*.*)|*.*" };
openFileDialog.ShowDialog();
openFileDialog = OpenFileDialog()
openFileDialog.Filter = "CSV files (*.csv)|*.csv|All files (*.*)|*.*"
openFileDialog.ShowDialog()