Table of Contents

Property Filter

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Filter

Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog window.

public virtual string? Filter { get; set; }

Property Value

string

The file filtering options available in the dialog window.

Remarks

For each filtering option, the filter string contains a description of the filter, followed by the vertical bar (|) and the filter pattern. The strings for different filtering options are separated by the vertical bar. The following is an example of a filter string:

Text files(*.txt)|*.txt|All files(*.*)|*.*

You can add several filter patterns to a filter by separating the file types with semicolons, for example:

Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files(*.*)|*.*

Use the SelectedFilterIndex property to set which filtering option is shown first to the user.