In This Article

FloatingPointNumberPartEditBoxBase<T> Class

Represents the abstract base class for a part-based edit box for floating point numeric values.

public abstract class FloatingPointNumberPartEditBoxBase<T> : NumberPartEditBoxBase<T> where T : struct, IFloatingPoint<T>, IMinMaxValue<T>
Type Parameters:
T -

The numeric type to be edited.

Inheritance:
object Visual UIElement FrameworkElement Control PartEditBoxBase<T?> NumberPartEditBoxBase<T> object
Derived:
DecimalEditBox FloatingPointIeee754NumberPartEditBoxBase<T>

Constructors

FloatingPointNumberPartEditBoxBase()

Initializes an instance of the class.

protected FloatingPointNumberPartEditBoxBase()

Properties

CanSnapToChangePrecision

Indicates whether the value should be snapped to the precision of the incremental change value prior to applying the increment.

public bool CanSnapToChangePrecision { get; set; }

Property Value

bool:

true if the value should be snapped to the precision of the incremental change value prior to applying the increment; otherwise, false. The default value is true.

Remarks

When true, a value of 1.24 with change value 0.1 would result in 1.3. When false, a value of 1.24 with change value 0.1 would result in 1.34.

Format

The number format string.

public string Format { get; set; }

Property Value

string:

The default value is "G".

Remarks

This value can be defined as a numeric (e.g., "D") or composite (e.g., "{0:D}") format string.

RoundingDecimalPlace

The rounding decimal place, which is a value between 0 and 15.

public int? RoundingDecimalPlace { get; set; }

Property Value

int?:

When null or negative, rounding will be disabled. The default value is 8.

Methods

CreateIncrementalChangeRequest(IncrementalChangeRequestKind)

Creates an incremental change (spin) request.

protected override IncrementalChangeRequest<T?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
Parameter Type Description
kind IncrementalChangeRequestKind

The kind of request.

Returns

IncrementalChangeRequest<T?>:

The incremental change (spin) request that was created.

Fields

CanSnapToChangePrecisionProperty

Defines the CanSnapToChangePrecision property.

public static readonly DependencyProperty CanSnapToChangePrecisionProperty

RoundingDecimalPlaceProperty

Defines the RoundingDecimalPlace property.

public static readonly DependencyProperty RoundingDecimalPlaceProperty

Inherited Members

Extension Methods