Table of Contents

Class MaskAttribute

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

Restricts the input of a text or numeric setting to a mask.

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

Constructors

MaskAttribute()

Initializes a numeric mask; set Mask or MethodName.

public MaskAttribute()

MaskAttribute(MaskTypes, string)

Initializes a mask of the given kind.

Added in ATAS 8.0.15.

public MaskAttribute(MaskTypes type, string mask)

Parameters

type MaskTypes

The kind of the mask.

mask string

The mask, in the syntax of type.

Properties

Culture

Gets or sets the name of the culture the mask is applied with (for example en-US); the current culture when empty. Applied by ATAS X.

public string Culture { get; set; }

Property Value

string

Mask

Gets or sets the mask, in the syntax of MaskType.

public string Mask { get; set; }

Property Value

string

MaskAsDisplayFormat

Gets or sets a value indicating whether the value is also displayed with the mask when it is not being edited; true by default.

public bool MaskAsDisplayFormat { get; set; }

Property Value

bool

MaskType

Gets or sets the kind of the mask; Numeric by default.

public MaskTypes MaskType { get; set; }

Property Value

MaskTypes

MethodName

Gets or sets the name of a parameterless method of the object that returns the mask; when it returns a non-empty string, that string is used instead of Mask.

public string MethodName { get; set; }

Property Value

string