Table of Contents

Class FileDialogFilterBuilder

Namespace
PaintDotNet
Assembly
PaintDotNet.Core.dll

A helper class for creating a string to use for the FilterText property of an OpenFileDialog or SaveFileDialog.

public sealed class FileDialogFilterBuilder
Inheritance
FileDialogFilterBuilder
Inherited Members

Constructors

FileDialogFilterBuilder()

Methods

AddEntries(IEnumerable<FileDialogFilterEntry>)
AddEntry(FileDialogFilterEntry)

Adds an entry that will be included in the filter text string.

AddEntry(string, IEnumerable<string>, object?)

Adds an entry that will be included in the filter text string.

Build()

Builds and returns the FileDialogFilter, which can be used to set the FilterText property on a FileDialog.

SetAllTypesDescription(string?)

Sets the description for an entry that includes the extensions from all of the other entries. This is useful when working with a FileOpenDialog. This will typically be set to something like "All file types" or "All image types". The entry is automatically created and is placed at the front/top of the generated filter text.

Setting this to a non-null string will cause the entry to be generated.
Setting this to null or an empty string will omit the entry.
The default value is null.

SetWildcardDescription(string?)

Sets the description for a wildcard (.) entry. The entry is automatically created and is placed at the back/bottom of the generated filter text.

Setting this to a non-null string will cause the entry to be generated.
Setting this to null or an empty string will omit the entry.
The default value is null.