Struct DialogFileFilter
Describes a file filter used to filter visible files/folders in a file dialog.
Implements
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public struct DialogFileFilter : IEquatable<DialogFileFilter>
Constructors
DialogFileFilter(string, string)
Initializes a new instance of the DialogFileFilter struct.
Declaration
public DialogFileFilter(string name, string filter)
Parameters
Type | Name | Description |
---|---|---|
string | name | The display name of the filter. |
string | filter | The filter string. |
Fields
Filter
The file extension filter. The format of this string is "ext1;ext2". Use *
to match any files.
Declaration
public string Filter
Field Value
Type | Description |
---|---|
string |
Examples
new DialogFileFilter(){ Name="Images", Filter="png;jpg;jpeg" }; This creates a file filter that will match any files ending in png, jpg, or jpeg.
Name
The display name of the filter. Prohibited characters are |
and \0
.
Declaration
public string Name
Field Value
Type | Description |
---|---|
string |
Methods
Equals(DialogFileFilter)
Indicates whether the current object is equal to another object of the same type.
Declaration
public readonly bool Equals(DialogFileFilter other)
Parameters
Type | Name | Description |
---|---|---|
DialogFileFilter | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override readonly bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
ToString()
Returns a string in the form "{Name} - {Filter}".
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
string | The string representation. |
Overrides
Operators
operator ==(DialogFileFilter, DialogFileFilter)
Determines whether two specified instances of DialogFileFilter are equal.
Declaration
public static bool operator ==(DialogFileFilter left, DialogFileFilter right)
Parameters
Type | Name | Description |
---|---|---|
DialogFileFilter | left | The first dialog file filter to compare. |
DialogFileFilter | right | The second dialog file filter to compare. |
Returns
Type | Description |
---|---|
bool |
|
operator !=(DialogFileFilter, DialogFileFilter)
Determines whether two specified instances of DialogFileFilter are not equal.
Declaration
public static bool operator !=(DialogFileFilter left, DialogFileFilter right)
Parameters
Type | Name | Description |
---|---|---|
DialogFileFilter | left | The first dialog file filter to compare. |
DialogFileFilter | right | The second dialog file filter to compare. |
Returns
Type | Description |
---|---|
bool |
|