In This Article

Int32EditBox Class

Represents an Int32 edit box.

public class Int32EditBox : PartEditBoxBase<int?>
Inheritance:
object Visual UIElement FrameworkElement Control PartEditBoxBase<int?> object

Constructors

Int32EditBox()

Initializes an instance of the Int32EditBox class.

public Int32EditBox()

Properties

CalculatorPopupPickerStyle

Gets or sets the popup picker Style that uses a Calculator control.

public Style CalculatorPopupPickerStyle { get; set; }

Property Value

Style:

The Style that uses a Calculator control.

DefaultValue

Gets or sets the value to set when incrementing/decrementing from a null value.

public int DefaultValue { get; set; }

Property Value

int:

The value to set when incrementing/decrementing from a null value. The default value is 0.

Format

Gets or sets the number format string.

public string Format { get; set; }

Property Value

string:

The number format string. The default value is "D".

LargeChange

Gets or sets the large change value.

public int LargeChange { get; set; }

Property Value

int:

The large change value. The default value is 5.

Maximum

Gets or sets the highest possible value.

public int Maximum { get; set; }

Property Value

int:

The highest possible value.

Minimum

Gets or sets the lowest possible value.

public int Minimum { get; set; }

Property Value

int:

The lowest possible value.

PickerKind

Gets or sets an Int32EditBoxPickerKind indicating the pre-defined Style to apply to the picker used within the popup.

public Int32EditBoxPickerKind PickerKind { get; set; }

Property Value

Int32EditBoxPickerKind:

An Int32EditBoxPickerKind indicating the pre-defined Style to apply to the picker used within the popup. The default value is Calculator in WPF and Default in UWP.

ResolvedFormat

Gets the resolved number format string.

public string ResolvedFormat { get; }

Property Value

string:

The resolved number format string.

SmallChange

Gets or sets the small change value.

public int SmallChange { get; set; }

Property Value

int:

The small change value. The default value is 1.

Methods

CoerceValidValue(int?)

Coerces the value to be within range.

protected override int? CoerceValidValue(int? value)
Parameter Type Description
value int?

The value to coerce.

Returns

int?:

The coerced value.

ConvertToString(int?)

Converts the specified value to a string representation.

protected override string ConvertToString(int? valueToConvert)
Parameter Type Description
valueToConvert int?

The value.

Returns

string:

The string representation of the specified value.

CreateIncrementalChangeRequest(IncrementalChangeRequestKind)

Creates an incremental change (spin) request.

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

The kind of request.

Returns

IncrementalChangeRequest<int?>:

The incremental change (spin) request that was created.

GenerateParts()

Generates the parts for the edit box.

protected override IList<IPart> GenerateParts()

Returns

IList<IPart>:

The parts that were generated.

IsValidValue(int?)

Returns whether the specified value is valid.

protected override bool IsValidValue(int? value)
Parameter Type Description
value int?

The value to examine.

Returns

bool:

true if the value is valid; otherwise, false.

RaiseValueChangedEvent()

Raises the ValueChanged event.

protected override void RaiseValueChangedEvent()

ResetValue()

Resets the value to a default value.

protected override void ResetValue()

TryConvertFromString(string, bool, out int?)

Tries to convert the specified text to a value.

protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out int? value)
Parameter Type Description
textToConvert string

The text.

canCoerce bool

Whether the returned value should be coerced to fall within the allowed value range.

value int?

Returns the value for the specified text.

Returns

bool:

true if the text was converted to a value successfully; otherwise, false.

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

EventHandler

Fields

CalculatorPopupPickerStyleProperty

Identifies the CalculatorPopupPickerStyle dependency property. This field is read-only.

public static readonly DependencyProperty CalculatorPopupPickerStyleProperty

DefaultValueProperty

Identifies the DefaultValue dependency property. This field is read-only.

public static readonly DependencyProperty DefaultValueProperty

FormatProperty

Identifies the Format dependency property. This field is read-only.

public static readonly DependencyProperty FormatProperty

LargeChangeProperty

Identifies the LargeChange dependency property. This field is read-only.

public static readonly DependencyProperty LargeChangeProperty

MaximumProperty

Identifies the Maximum dependency property. This field is read-only.

public static readonly DependencyProperty MaximumProperty

MinimumProperty

Identifies the Minimum dependency property. This field is read-only.

public static readonly DependencyProperty MinimumProperty

PickerKindProperty

Identifies the PickerKind dependency property. This field is read-only.

public static readonly DependencyProperty PickerKindProperty

ResolvedFormatProperty

Identifies the ResolvedFormat dependency property. This field is read-only.

public static readonly DependencyProperty ResolvedFormatProperty

SmallChangeProperty

Identifies the SmallChange dependency property. This field is read-only.

public static readonly DependencyProperty SmallChangeProperty

Inherited Members