Int32EditBox Class
Represents an Int32
edit box.
public class Int32EditBox : PartEditBoxBase<int?>, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control PartEditBoxBase<System.Nullable<System.Int32>> Object
Constructors
Int32EditBox()
Initializes an instance of the Int32EditBox
class.
public Int32EditBox()
Properties
CalculatorPopupPickerStyle
Gets or sets the popup picker System.Windows.Style that uses a Calculator control.
public Style CalculatorPopupPickerStyle { get; set; }
Property Value
- System.Windows.Style:
The System.Windows.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
- System.Int32:
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
- System.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
- System.Int32:
The large change value. The default value is
5
.
Maximum
Gets or sets the highest possible value.
public int Maximum { get; set; }
Property Value
- System.Int32:
The highest possible value.
Minimum
Gets or sets the lowest possible value.
public int Minimum { get; set; }
Property Value
- System.Int32:
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 isCalculator
in WPF andDefault
in UWP.
ResolvedFormat
Gets the resolved number format string.
public string ResolvedFormat { get; }
Property Value
- System.String:
The resolved number format string.
SmallChange
Gets or sets the small change value.
public int SmallChange { get; set; }
Property Value
- System.Int32:
The small change value. The default value is
1
.
Methods
CoerceValidValue(Nullable<Int32>)
Coerces the value to be within range.
protected override int? CoerceValidValue(int? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Int32> | The value to coerce. |
Returns
- System.Nullable<System.Int32>:
The coerced value.
ConvertToString(Nullable<Int32>)
Converts the specified value to a string representation.
protected override string ConvertToString(int? valueToConvert)
Parameter | Type | Description |
---|---|---|
valueToConvert | System.Nullable<System.Int32> | The value. |
Returns
- System.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<System.Nullable<System.Int32>>:
The incremental change (spin) request that was created.
GenerateParts()
Generates the parts for the edit box.
protected override IList<IPart> GenerateParts()
Returns
- System.Collections.Generic.IList<IPart>:
The parts that were generated.
IsValidValue(Nullable<Int32>)
Returns whether the specified value is valid.
protected override bool IsValidValue(int? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Int32> | The value to examine. |
Returns
- System.Boolean:
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, Boolean, out Nullable<Int32>)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out int? value)
Parameter | Type | Description |
---|---|---|
textToConvert | System.String | The text. |
canCoerce | System.Boolean | Whether the returned value should be coerced to fall within the allowed value range. |
value | System.Nullable<System.Int32> | Returns the value for the specified text. |
Returns
- System.Boolean:
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
- System.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
- PartEditBoxBase<Nullable<Int32>>.ActivePartIndexProperty
- PartEditBoxBase<Nullable<Int32>>.CommitTriggersProperty
- PartEditBoxBase<Nullable<Int32>>.HasPopupProperty
- PartEditBoxBase<Nullable<Int32>>.InlinesProperty
- PartEditBoxBase<Nullable<Int32>>.InputScopeNameValueProperty
- PartEditBoxBase<Nullable<Int32>>.IntermediateValueProperty
- PartEditBoxBase<Nullable<Int32>>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<Nullable<Int32>>.IsEditableProperty
- PartEditBoxBase<Nullable<Int32>>.IsNullAllowedProperty
- PartEditBoxBase<Nullable<Int32>>.IsPopupButtonVisibleProperty
- PartEditBoxBase<Nullable<Int32>>.IsPopupOpenProperty
- PartEditBoxBase<Nullable<Int32>>.IsReadOnlyProperty
- PartEditBoxBase<Nullable<Int32>>.IsSpinnerVisibleProperty
- PartEditBoxBase<Nullable<Int32>>.IsUndoEnabledProperty
- PartEditBoxBase<Nullable<Int32>>.PlaceholderTextProperty
- PartEditBoxBase<Nullable<Int32>>.PopupBackgroundProperty
- PartEditBoxBase<Nullable<Int32>>.PopupBorderBrushProperty
- PartEditBoxBase<Nullable<Int32>>.PopupPickerStyleProperty
- PartEditBoxBase<Nullable<Int32>>.SpinWrappingProperty
- PartEditBoxBase<Nullable<Int32>>.TextAlignmentProperty
- PartEditBoxBase<Nullable<Int32>>.ValueProperty
- PartEditBoxBase<Nullable<Int32>>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<Nullable<Int32>>.SpinnerVisibilityProperty
- PartEditBoxBase<Nullable<Int32>>.UsageContextProperty
- PartEditBoxBase<Nullable<Int32>>.Commit()
- PartEditBoxBase<Nullable<Int32>>.Commit(Boolean)
- PartEditBoxBase<Nullable<Int32>>.InvalidateParts()
- PartEditBoxBase<Nullable<Int32>>.OnApplyTemplate()
- PartEditBoxBase<Nullable<Int32>>.OnCreateAutomationPeer()
- PartEditBoxBase<Nullable<Int32>>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnIntermediateValueChanged(Nullable<Int32>, Nullable<Int32>)
- PartEditBoxBase<Nullable<Int32>>.OnIsNullAllowedChanged(Boolean, Boolean)
- PartEditBoxBase<Nullable<Int32>>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnPopupOpened()
- PartEditBoxBase<Nullable<Int32>>.OnValueChanged(Nullable<Int32>, Nullable<Int32>)
- PartEditBoxBase<Nullable<Int32>>.ProcessTextInput(String)
- PartEditBoxBase<Nullable<Int32>>.SelectAll()
- PartEditBoxBase<Nullable<Int32>>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<Nullable<Int32>>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Int32>>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<Nullable<Int32>>.ActivePartIndex
- PartEditBoxBase<Nullable<Int32>>.CommitTriggers
- PartEditBoxBase<Nullable<Int32>>.CurrentSelectionLength
- PartEditBoxBase<Nullable<Int32>>.CurrentSelectionStartOffset
- PartEditBoxBase<Nullable<Int32>>.CurrentText
- PartEditBoxBase<Nullable<Int32>>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<Nullable<Int32>>.HasPopup
- PartEditBoxBase<Nullable<Int32>>.Inlines
- PartEditBoxBase<Nullable<Int32>>.InputScopeNameValue
- PartEditBoxBase<Nullable<Int32>>.IntermediateValue
- PartEditBoxBase<Nullable<Int32>>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<Nullable<Int32>>.IsEditable
- PartEditBoxBase<Nullable<Int32>>.IsNullAllowed
- PartEditBoxBase<Nullable<Int32>>.IsPopupButtonVisible
- PartEditBoxBase<Nullable<Int32>>.IsPopupOpen
- PartEditBoxBase<Nullable<Int32>>.IsReadOnly
- PartEditBoxBase<Nullable<Int32>>.IsSpinnerVisible
- PartEditBoxBase<Nullable<Int32>>.IsUndoEnabled
- PartEditBoxBase<Nullable<Int32>>.Parts
- PartEditBoxBase<Nullable<Int32>>.PlaceholderText
- PartEditBoxBase<Nullable<Int32>>.PopupBackground
- PartEditBoxBase<Nullable<Int32>>.PopupBorderBrush
- PartEditBoxBase<Nullable<Int32>>.PopupPickerStyle
- PartEditBoxBase<Nullable<Int32>>.ResetValueCommand
- PartEditBoxBase<Nullable<Int32>>.SmallDecrementValueCommand
- PartEditBoxBase<Nullable<Int32>>.SmallIncrementValueCommand
- PartEditBoxBase<Nullable<Int32>>.SpinWrapping
- PartEditBoxBase<Nullable<Int32>>.TextAlignment
- PartEditBoxBase<Nullable<Int32>>.Value
- PartEditBoxBase<Nullable<Int32>>.IsNonDefaultUsageContext
- PartEditBoxBase<Nullable<Int32>>.SpinnerVisibility
- PartEditBoxBase<Nullable<Int32>>.UsageContext
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()