Table of Contents

Class PrecisionAttribute

Namespace
Bonsai
Assembly
Bonsai.Core.dll

Specifies the number of decimal places and the smallest incremental step that should be used when editing values for a property.

[AttributeUsage(AttributeTargets.Property)]
public sealed class PrecisionAttribute : Attribute, _Attribute
Inheritance
PrecisionAttribute
Implements
Inherited Members

Constructors

PrecisionAttribute(int, decimal)

Initializes a new instance of the PrecisionAttribute with the specified number of decimal places and the smallest editor step increment.

public PrecisionAttribute(int decimalPlaces, decimal increment)

Parameters

decimalPlaces int

The number of decimal places to display in the editor.

increment decimal

The decimal value by which to increment or decrement the current value on each editor step.

PrecisionAttribute(int, double)

Initializes a new instance of the PrecisionAttribute with the specified number of decimal places and the smallest editor step increment.

public PrecisionAttribute(int decimalPlaces, double increment)

Parameters

decimalPlaces int

The number of decimal places to display in the editor.

increment double

The double value by which to increment or decrement the current value on each editor step.

PrecisionAttribute(int, int)

Initializes a new instance of the PrecisionAttribute with the specified number of decimal places and the smallest editor step increment.

public PrecisionAttribute(int decimalPlaces, int increment)

Parameters

decimalPlaces int

The number of decimal places to display in the editor.

increment int

The int value by which to increment or decrement the current value on each editor step.

Properties

DecimalPlaces

Gets the number of decimal places to display in the editor.

public int DecimalPlaces { get; }

Property Value

int

Increment

Gets the smallest value by which to increment or decrement the current value on each editor step.

public decimal Increment { get; }

Property Value

decimal