In This Article

Int32RectEditBox Class

Represents a Int32Rect edit box.

public class Int32RectEditBox : PartEditBoxBase<Int32Rect?>
Inheritance:
object Visual UIElement FrameworkElement Control PartEditBoxBase<Int32Rect?> object

Constructors

Int32RectEditBox()

Initializes an instance of the Int32RectEditBox class.

public Int32RectEditBox()

Properties

DefaultValue

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

public Int32Rect DefaultValue { get; set; }

Property Value

Int32Rect:

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 "G".

LargeChange

Gets or sets the large change value.

public Int32Rect LargeChange { get; set; }

Property Value

Int32Rect:

The large change value. The default value is 5.

Maximum

Gets or sets the highest possible value.

public Int32Rect Maximum { get; set; }

Property Value

Int32Rect:

The highest possible value.

Minimum

Gets or sets the lowest possible value.

public Int32Rect Minimum { get; set; }

Property Value

Int32Rect:

The lowest possible value.

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 Int32Rect SmallChange { get; set; }

Property Value

Int32Rect:

The small change value. The default value is 1.

Methods

CoerceValidValue(Int32Rect?)

Coerces the value to be within range.

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

The value to coerce.

Returns

Int32Rect?:

The coerced value.

ConvertToString(Int32Rect?)

Converts the specified value to a string representation.

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

The value.

Returns

string:

The string representation of the specified value.

CreateIncrementalChangeRequest(IncrementalChangeRequestKind)

Creates an incremental change (spin) request.

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

The kind of request.

Returns

IncrementalChangeRequest<Int32Rect?>:

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(Int32Rect?)

Returns whether the specified value is valid.

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

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 Int32Rect?)

Tries to convert the specified text to a value.

protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out Int32Rect? 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 Int32Rect?

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

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

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