Int16EditBox Class
Represents an Int16
edit box.
public class Int16EditBox : PartEditBoxBase<short?>, 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.Int16>> Object
Constructors
Int16EditBox()
Initializes an instance of the Int16EditBox
class.
public Int16EditBox()
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 short DefaultValue { get; set; }
Property Value
- System.Int16:
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 short LargeChange { get; set; }
Property Value
- System.Int16:
The large change value. The default value is
5
.
Maximum
Gets or sets the highest possible value.
public short Maximum { get; set; }
Property Value
- System.Int16:
The highest possible value.
Minimum
Gets or sets the lowest possible value.
public short Minimum { get; set; }
Property Value
- System.Int16:
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.
public string ResolvedFormat { get; }
Property Value
- System.String:
The resolved number format string.
SmallChange
Gets or sets the small change value.
public short SmallChange { get; set; }
Property Value
- System.Int16:
The small change value. The default value is
1
.
Methods
CoerceValidValue(Nullable<Int16>)
Coerces the value to be within range.
protected override short? CoerceValidValue(short? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Int16> | The value to coerce. |
Returns
- System.Nullable<System.Int16>:
The coerced value.
ConvertToString(Nullable<Int16>)
Converts the specified value to a string representation.
protected override string ConvertToString(short? valueToConvert)
Parameter | Type | Description |
---|---|---|
valueToConvert | System.Nullable<System.Int16> | The value. |
Returns
- System.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<System.Nullable<System.Int16>>:
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<Int16>)
Returns whether the specified value is valid.
protected override bool IsValidValue(short? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Int16> | 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<Int16>)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out short? 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.Int16> | 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<Int16>>.ActivePartIndexProperty
- PartEditBoxBase<Nullable<Int16>>.CommitTriggersProperty
- PartEditBoxBase<Nullable<Int16>>.HasPopupProperty
- PartEditBoxBase<Nullable<Int16>>.InlinesProperty
- PartEditBoxBase<Nullable<Int16>>.InputScopeNameValueProperty
- PartEditBoxBase<Nullable<Int16>>.IntermediateValueProperty
- PartEditBoxBase<Nullable<Int16>>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<Nullable<Int16>>.IsEditableProperty
- PartEditBoxBase<Nullable<Int16>>.IsNullAllowedProperty
- PartEditBoxBase<Nullable<Int16>>.IsPopupButtonVisibleProperty
- PartEditBoxBase<Nullable<Int16>>.IsPopupOpenProperty
- PartEditBoxBase<Nullable<Int16>>.IsReadOnlyProperty
- PartEditBoxBase<Nullable<Int16>>.IsSpinnerVisibleProperty
- PartEditBoxBase<Nullable<Int16>>.IsUndoEnabledProperty
- PartEditBoxBase<Nullable<Int16>>.PlaceholderTextProperty
- PartEditBoxBase<Nullable<Int16>>.PopupBackgroundProperty
- PartEditBoxBase<Nullable<Int16>>.PopupBorderBrushProperty
- PartEditBoxBase<Nullable<Int16>>.PopupPickerStyleProperty
- PartEditBoxBase<Nullable<Int16>>.SpinWrappingProperty
- PartEditBoxBase<Nullable<Int16>>.TextAlignmentProperty
- PartEditBoxBase<Nullable<Int16>>.ValueProperty
- PartEditBoxBase<Nullable<Int16>>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<Nullable<Int16>>.SpinnerVisibilityProperty
- PartEditBoxBase<Nullable<Int16>>.UsageContextProperty
- PartEditBoxBase<Nullable<Int16>>.Commit()
- PartEditBoxBase<Nullable<Int16>>.Commit(Boolean)
- PartEditBoxBase<Nullable<Int16>>.InvalidateParts()
- PartEditBoxBase<Nullable<Int16>>.OnApplyTemplate()
- PartEditBoxBase<Nullable<Int16>>.OnCreateAutomationPeer()
- PartEditBoxBase<Nullable<Int16>>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnIntermediateValueChanged(Nullable<Int16>, Nullable<Int16>)
- PartEditBoxBase<Nullable<Int16>>.OnIsNullAllowedChanged(Boolean, Boolean)
- PartEditBoxBase<Nullable<Int16>>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnPopupOpened()
- PartEditBoxBase<Nullable<Int16>>.OnValueChanged(Nullable<Int16>, Nullable<Int16>)
- PartEditBoxBase<Nullable<Int16>>.ProcessTextInput(String)
- PartEditBoxBase<Nullable<Int16>>.SelectAll()
- PartEditBoxBase<Nullable<Int16>>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<Nullable<Int16>>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Int16>>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<Nullable<Int16>>.ActivePartIndex
- PartEditBoxBase<Nullable<Int16>>.CommitTriggers
- PartEditBoxBase<Nullable<Int16>>.CurrentSelectionLength
- PartEditBoxBase<Nullable<Int16>>.CurrentSelectionStartOffset
- PartEditBoxBase<Nullable<Int16>>.CurrentText
- PartEditBoxBase<Nullable<Int16>>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<Nullable<Int16>>.HasPopup
- PartEditBoxBase<Nullable<Int16>>.Inlines
- PartEditBoxBase<Nullable<Int16>>.InputScopeNameValue
- PartEditBoxBase<Nullable<Int16>>.IntermediateValue
- PartEditBoxBase<Nullable<Int16>>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<Nullable<Int16>>.IsEditable
- PartEditBoxBase<Nullable<Int16>>.IsNullAllowed
- PartEditBoxBase<Nullable<Int16>>.IsPopupButtonVisible
- PartEditBoxBase<Nullable<Int16>>.IsPopupOpen
- PartEditBoxBase<Nullable<Int16>>.IsReadOnly
- PartEditBoxBase<Nullable<Int16>>.IsSpinnerVisible
- PartEditBoxBase<Nullable<Int16>>.IsUndoEnabled
- PartEditBoxBase<Nullable<Int16>>.Parts
- PartEditBoxBase<Nullable<Int16>>.PlaceholderText
- PartEditBoxBase<Nullable<Int16>>.PopupBackground
- PartEditBoxBase<Nullable<Int16>>.PopupBorderBrush
- PartEditBoxBase<Nullable<Int16>>.PopupPickerStyle
- PartEditBoxBase<Nullable<Int16>>.ResetValueCommand
- PartEditBoxBase<Nullable<Int16>>.SmallDecrementValueCommand
- PartEditBoxBase<Nullable<Int16>>.SmallIncrementValueCommand
- PartEditBoxBase<Nullable<Int16>>.SpinWrapping
- PartEditBoxBase<Nullable<Int16>>.TextAlignment
- PartEditBoxBase<Nullable<Int16>>.Value
- PartEditBoxBase<Nullable<Int16>>.IsNonDefaultUsageContext
- PartEditBoxBase<Nullable<Int16>>.SpinnerVisibility
- PartEditBoxBase<Nullable<Int16>>.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()