Int16EditBox Class
Represents an Int16
edit box.
public class Int16EditBox : PartEditBoxBase<short?>
- Inheritance:
- object Visual UIElement FrameworkElement Control PartEditBoxBase<short?> object
Constructors
Int16EditBox()
Initializes an instance of the Int16EditBox
class.
public Int16EditBox()
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 short DefaultValue { get; set; }
Property Value
- short:
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 short LargeChange { get; set; }
Property Value
- short:
The large change value. The default value is
5
.
Maximum
Gets or sets the highest possible value.
Minimum
Gets or sets the lowest possible value.
PickerKind
Gets or sets an Int16EditBoxPickerKind indicating the pre-defined Style
to apply to the picker used within the popup.
public Int16EditBoxPickerKind PickerKind { get; set; }
Property Value
- Int16EditBoxPickerKind:
An Int16EditBoxPickerKind 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.
SmallChange
Gets or sets the small change value.
public short SmallChange { get; set; }
Property Value
- short:
The small change value. The default value is
1
.
Methods
CoerceValidValue(short?)
Coerces the value to be within range.
protected override short? CoerceValidValue(short? value)
Parameter | Type | Description |
---|---|---|
value | short? | The value to coerce. |
Returns
- short?:
The coerced value.
ConvertToString(short?)
Converts the specified value to a string representation.
protected override string ConvertToString(short? valueToConvert)
Parameter | Type | Description |
---|---|---|
valueToConvert | short? | The value. |
Returns
- string:
The string representation of the specified value.
CreateIncrementalChangeRequest(IncrementalChangeRequestKind)
Creates an incremental change (spin) request.
protected override IncrementalChangeRequest<short?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
Parameter | Type | Description |
---|---|---|
kind | IncrementalChangeRequestKind | The kind of request. |
Returns
- IncrementalChangeRequest<short?>:
The incremental change (spin) request that was created.
GenerateParts()
Generates the parts for the edit box.
protected override IList<IPart> GenerateParts()
Returns
IsValidValue(short?)
Returns whether the specified value is valid.
protected override bool IsValidValue(short? value)
Parameter | Type | Description |
---|---|---|
value | short? | 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 short?)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out short? 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 | short? | 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.
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<short?>.ActivePartIndexProperty
- PartEditBoxBase<short?>.CommitTriggersProperty
- PartEditBoxBase<short?>.HasPopupProperty
- PartEditBoxBase<short?>.InlinesProperty
- PartEditBoxBase<short?>.InputScopeNameValueProperty
- PartEditBoxBase<short?>.IntermediateValueProperty
- PartEditBoxBase<short?>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<short?>.IsEditableProperty
- PartEditBoxBase<short?>.IsNullAllowedProperty
- PartEditBoxBase<short?>.IsPopupButtonVisibleProperty
- PartEditBoxBase<short?>.IsPopupOpenProperty
- PartEditBoxBase<short?>.IsReadOnlyProperty
- PartEditBoxBase<short?>.IsSpinnerVisibleProperty
- PartEditBoxBase<short?>.IsUndoEnabledProperty
- PartEditBoxBase<short?>.PlaceholderTextProperty
- PartEditBoxBase<short?>.PopupBackgroundProperty
- PartEditBoxBase<short?>.PopupBorderBrushProperty
- PartEditBoxBase<short?>.PopupPickerStyleProperty
- PartEditBoxBase<short?>.SpinWrappingProperty
- PartEditBoxBase<short?>.TextAlignmentProperty
- PartEditBoxBase<short?>.ValueProperty
- PartEditBoxBase<short?>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<short?>.SpinnerVisibilityProperty
- PartEditBoxBase<short?>.UsageContextProperty
- PartEditBoxBase<short?>.Commit()
- PartEditBoxBase<short?>.Commit(bool)
- PartEditBoxBase<short?>.InvalidateParts()
- PartEditBoxBase<short?>.OnApplyTemplate()
- PartEditBoxBase<short?>.OnCreateAutomationPeer()
- PartEditBoxBase<short?>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<short?>.OnIntermediateValueChanged(short?, short?)
- PartEditBoxBase<short?>.OnIsNullAllowedChanged(bool, bool)
- PartEditBoxBase<short?>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<short?>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<short?>.OnPopupOpened()
- PartEditBoxBase<short?>.OnValueChanged(short?, short?)
- PartEditBoxBase<short?>.ProcessTextInput(string)
- PartEditBoxBase<short?>.SelectAll()
- PartEditBoxBase<short?>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<short?>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<short?>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<short?>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<short?>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<short?>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<short?>.ActivePartIndex
- PartEditBoxBase<short?>.CommitTriggers
- PartEditBoxBase<short?>.CurrentSelectionLength
- PartEditBoxBase<short?>.CurrentSelectionStartOffset
- PartEditBoxBase<short?>.CurrentText
- PartEditBoxBase<short?>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<short?>.HasPopup
- PartEditBoxBase<short?>.Inlines
- PartEditBoxBase<short?>.InputScopeNameValue
- PartEditBoxBase<short?>.IntermediateValue
- PartEditBoxBase<short?>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<short?>.IsEditable
- PartEditBoxBase<short?>.IsNullAllowed
- PartEditBoxBase<short?>.IsPopupButtonVisible
- PartEditBoxBase<short?>.IsPopupOpen
- PartEditBoxBase<short?>.IsReadOnly
- PartEditBoxBase<short?>.IsSpinnerVisible
- PartEditBoxBase<short?>.IsUndoEnabled
- PartEditBoxBase<short?>.Parts
- PartEditBoxBase<short?>.PlaceholderText
- PartEditBoxBase<short?>.PopupBackground
- PartEditBoxBase<short?>.PopupBorderBrush
- PartEditBoxBase<short?>.PopupPickerStyle
- PartEditBoxBase<short?>.ResetValueCommand
- PartEditBoxBase<short?>.SmallDecrementValueCommand
- PartEditBoxBase<short?>.SmallIncrementValueCommand
- PartEditBoxBase<short?>.SpinWrapping
- PartEditBoxBase<short?>.TextAlignment
- PartEditBoxBase<short?>.Value
- PartEditBoxBase<short?>.IsNonDefaultUsageContext
- PartEditBoxBase<short?>.SpinnerVisibility
- PartEditBoxBase<short?>.UsageContext