Table of Contents

Class NumericEditorAttribute

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

Edits a numeric setting with a spin editor or a track bar, optionally limited to a range.

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

Constructors

NumericEditorAttribute()

Initializes a spin editor without limits and with step 1.

public NumericEditorAttribute()

NumericEditorAttribute(NumericEditorTypes, double)

Initializes an editor of the given kind with a lower limit.

public NumericEditorAttribute(NumericEditorTypes editorType, double minValue)

Parameters

editorType NumericEditorTypes

The editor: a spin editor or a track bar.

minValue double

The smallest value the editor accepts.

NumericEditorAttribute(NumericEditorTypes, double, double)

Initializes an editor of the given kind limited to a range.

public NumericEditorAttribute(NumericEditorTypes editorType, double minValue, double maxValue)

Parameters

editorType NumericEditorTypes

The editor: a spin editor or a track bar.

minValue double

The smallest value the editor accepts.

maxValue double

The largest value the editor accepts.

NumericEditorAttribute(double)

Initializes a spin editor with a lower limit.

public NumericEditorAttribute(double minValue)

Parameters

minValue double

The smallest value the editor accepts.

NumericEditorAttribute(double, double)

Initializes a spin editor limited to a range.

public NumericEditorAttribute(double minValue, double maxValue)

Parameters

minValue double

The smallest value the editor accepts.

maxValue double

The largest value the editor accepts.

Properties

DisplayFormat

Gets or sets the numeric mask the value is entered and shown with (for example n2); none by default.

public string DisplayFormat { get; set; }

Property Value

string

EditorType

Gets or sets the editor: a spin editor (default) or a track bar.

public NumericEditorTypes EditorType { get; set; }

Property Value

NumericEditorTypes

MaxValue

Gets the largest value the editor accepts; null for no upper limit.

public double? MaxValue { get; }

Property Value

double?

MinValue

Gets the smallest value the editor accepts; null for no lower limit.

public double? MinValue { get; }

Property Value

double?

Step

Gets or sets the increment of the spin buttons and of the track bar; 1 by default.

public double Step { get; set; }

Property Value

double