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