VectorEditBox Class
Represents a Vector
edit box.
public class VectorEditBox : PartEditBoxBase<Vector?>, 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.Windows.Vector>> Object
Constructors
VectorEditBox()
Initializes an instance of the VectorEditBox
class.
public VectorEditBox()
Properties
DefaultValue
Gets or sets the value to set when incrementing/decrementing from a null value.
public Vector DefaultValue { get; set; }
Property Value
- System.Windows.Vector:
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
"G"
.
IsNaNAllowed
Gets or sets whether NaN is accepted as a component value.
public bool IsNaNAllowed { get; set; }
Property Value
- System.Boolean:
true
if NaN is accepted as a component value; otherwise,false
. The default value isfalse
.
IsNegativeInfinityAllowed
Gets or sets whether NegativeInfinity is accepted as a component value.
public bool IsNegativeInfinityAllowed { get; set; }
Property Value
- System.Boolean:
true
if NegativeInfinity is accepted as a component value; otherwise,false
. The default value isfalse
.
IsPositiveInfinityAllowed
Gets or sets whether PositiveInfinity is accepted as a component value.
public bool IsPositiveInfinityAllowed { get; set; }
Property Value
- System.Boolean:
true
if PositiveInfinity is accepted as a component value; otherwise,false
. The default value isfalse
.
LargeChange
Gets or sets the large change value.
public Vector LargeChange { get; set; }
Property Value
- System.Windows.Vector:
The large change value. The default value is
5.0
.
Maximum
Gets or sets the highest possible value.
public Vector Maximum { get; set; }
Property Value
- System.Windows.Vector:
The highest possible value.
Minimum
Gets or sets the lowest possible value.
public Vector Minimum { get; set; }
Property Value
- System.Windows.Vector:
The lowest possible value.
ResolvedFormat
Gets the resolved number format string.
public string ResolvedFormat { get; }
Property Value
- System.String:
The resolved number format string.
RoundingDecimalPlace
Gets or sets the rounding decimal place.
public int? RoundingDecimalPlace { get; set; }
Property Value
- System.Nullable<System.Int32>:
The rounding decimal place, which is a value between
0
and15
. Pass a null value to disable rounding. The default value is8
.
SmallChange
Gets or sets the small change value.
public Vector SmallChange { get; set; }
Property Value
- System.Windows.Vector:
The small change value. The default value is
1.0
.
Methods
CoerceValidValue(Nullable<Vector>)
Coerces the value to be within range.
protected override Vector? CoerceValidValue(Vector? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Windows.Vector> | The value to coerce. |
Returns
- System.Nullable<System.Windows.Vector>:
The coerced value.
ConvertToString(Nullable<Vector>)
Converts the specified value to a string representation.
protected override string ConvertToString(Vector? valueToConvert)
Parameter | Type | Description |
---|---|---|
valueToConvert | System.Nullable<System.Windows.Vector> | The value. |
Returns
- System.String:
The string representation of the specified value.
CreateIncrementalChangeRequest(IncrementalChangeRequestKind)
Creates an incremental change (spin) request.
protected override IncrementalChangeRequest<Vector?> CreateIncrementalChangeRequest(IncrementalChangeRequestKind kind)
Parameter | Type | Description |
---|---|---|
kind | IncrementalChangeRequestKind | The kind of request. |
Returns
- IncrementalChangeRequest<System.Nullable<System.Windows.Vector>>:
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<Vector>)
Returns whether the specified value is valid.
protected override bool IsValidValue(Vector? value)
Parameter | Type | Description |
---|---|---|
value | System.Nullable<System.Windows.Vector> | The value to examine. |
Returns
- System.Boolean:
true
if the value is valid; otherwise,false
.
ProcessTextInput(String)
Processes typed text.
protected override bool ProcessTextInput(string text)
Parameter | Type | Description |
---|---|---|
text | System.String | The typed text. |
Returns
- System.Boolean:
true
if the typed text was handled and should not be allowed to be entered; 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<Vector>)
Tries to convert the specified text to a value.
protected override bool TryConvertFromString(string textToConvert, bool canCoerce, out Vector? 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.Windows.Vector> | 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
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
IsNaNAllowedProperty
Identifies the IsNaNAllowed dependency property. This field is read-only.
public static readonly DependencyProperty IsNaNAllowedProperty
IsNegativeInfinityAllowedProperty
Identifies the IsNegativeInfinityAllowed dependency property. This field is read-only.
public static readonly DependencyProperty IsNegativeInfinityAllowedProperty
IsPositiveInfinityAllowedProperty
Identifies the IsPositiveInfinityAllowed dependency property. This field is read-only.
public static readonly DependencyProperty IsPositiveInfinityAllowedProperty
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
RoundingDecimalPlaceProperty
Identifies the RoundingDecimalPlace dependency property. This field is read-only.
public static readonly DependencyProperty RoundingDecimalPlaceProperty
SmallChangeProperty
Identifies the SmallChange dependency property. This field is read-only.
public static readonly DependencyProperty SmallChangeProperty
Inherited Members
- PartEditBoxBase<Nullable<Vector>>.ActivePartIndexProperty
- PartEditBoxBase<Nullable<Vector>>.CommitTriggersProperty
- PartEditBoxBase<Nullable<Vector>>.HasPopupProperty
- PartEditBoxBase<Nullable<Vector>>.InlinesProperty
- PartEditBoxBase<Nullable<Vector>>.InputScopeNameValueProperty
- PartEditBoxBase<Nullable<Vector>>.IntermediateValueProperty
- PartEditBoxBase<Nullable<Vector>>.IsArrowKeyPartNavigationEnabledProperty
- PartEditBoxBase<Nullable<Vector>>.IsEditableProperty
- PartEditBoxBase<Nullable<Vector>>.IsNullAllowedProperty
- PartEditBoxBase<Nullable<Vector>>.IsPopupButtonVisibleProperty
- PartEditBoxBase<Nullable<Vector>>.IsPopupOpenProperty
- PartEditBoxBase<Nullable<Vector>>.IsReadOnlyProperty
- PartEditBoxBase<Nullable<Vector>>.IsSpinnerVisibleProperty
- PartEditBoxBase<Nullable<Vector>>.IsUndoEnabledProperty
- PartEditBoxBase<Nullable<Vector>>.PlaceholderTextProperty
- PartEditBoxBase<Nullable<Vector>>.PopupBackgroundProperty
- PartEditBoxBase<Nullable<Vector>>.PopupBorderBrushProperty
- PartEditBoxBase<Nullable<Vector>>.PopupPickerStyleProperty
- PartEditBoxBase<Nullable<Vector>>.SpinWrappingProperty
- PartEditBoxBase<Nullable<Vector>>.TextAlignmentProperty
- PartEditBoxBase<Nullable<Vector>>.ValueProperty
- PartEditBoxBase<Nullable<Vector>>.IsNonDefaultUsageContextProperty
- PartEditBoxBase<Nullable<Vector>>.SpinnerVisibilityProperty
- PartEditBoxBase<Nullable<Vector>>.UsageContextProperty
- PartEditBoxBase<Nullable<Vector>>.Commit()
- PartEditBoxBase<Nullable<Vector>>.Commit(Boolean)
- PartEditBoxBase<Nullable<Vector>>.InvalidateParts()
- PartEditBoxBase<Nullable<Vector>>.OnApplyTemplate()
- PartEditBoxBase<Nullable<Vector>>.OnCreateAutomationPeer()
- PartEditBoxBase<Nullable<Vector>>.OnGotFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnIntermediateValueChanged(Nullable<Vector>, Nullable<Vector>)
- PartEditBoxBase<Nullable<Vector>>.OnIsNullAllowedChanged(Boolean, Boolean)
- PartEditBoxBase<Nullable<Vector>>.OnKeyDown(KeyEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnLostFocus(RoutedEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnPopupOpened()
- PartEditBoxBase<Nullable<Vector>>.OnValueChanged(Nullable<Vector>, Nullable<Vector>)
- PartEditBoxBase<Nullable<Vector>>.SelectAll()
- PartEditBoxBase<Nullable<Vector>>.UpdateIntermediateValueAndTextFromValue()
- PartEditBoxBase<Nullable<Vector>>.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnLostMouseCapture(MouseEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnMouseLeftButtonDown(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnPreviewMouseUp(MouseButtonEventArgs)
- PartEditBoxBase<Nullable<Vector>>.OnPreviewTextInput(TextCompositionEventArgs)
- PartEditBoxBase<Nullable<Vector>>.ActivePartIndex
- PartEditBoxBase<Nullable<Vector>>.CommitTriggers
- PartEditBoxBase<Nullable<Vector>>.CurrentSelectionLength
- PartEditBoxBase<Nullable<Vector>>.CurrentSelectionStartOffset
- PartEditBoxBase<Nullable<Vector>>.CurrentText
- PartEditBoxBase<Nullable<Vector>>.HasPopupButtonWhenReadOnly
- PartEditBoxBase<Nullable<Vector>>.HasPopup
- PartEditBoxBase<Nullable<Vector>>.Inlines
- PartEditBoxBase<Nullable<Vector>>.InputScopeNameValue
- PartEditBoxBase<Nullable<Vector>>.IntermediateValue
- PartEditBoxBase<Nullable<Vector>>.IsArrowKeyPartNavigationEnabled
- PartEditBoxBase<Nullable<Vector>>.IsEditable
- PartEditBoxBase<Nullable<Vector>>.IsNullAllowed
- PartEditBoxBase<Nullable<Vector>>.IsPopupButtonVisible
- PartEditBoxBase<Nullable<Vector>>.IsPopupOpen
- PartEditBoxBase<Nullable<Vector>>.IsReadOnly
- PartEditBoxBase<Nullable<Vector>>.IsSpinnerVisible
- PartEditBoxBase<Nullable<Vector>>.IsUndoEnabled
- PartEditBoxBase<Nullable<Vector>>.Parts
- PartEditBoxBase<Nullable<Vector>>.PlaceholderText
- PartEditBoxBase<Nullable<Vector>>.PopupBackground
- PartEditBoxBase<Nullable<Vector>>.PopupBorderBrush
- PartEditBoxBase<Nullable<Vector>>.PopupPickerStyle
- PartEditBoxBase<Nullable<Vector>>.ResetValueCommand
- PartEditBoxBase<Nullable<Vector>>.SmallDecrementValueCommand
- PartEditBoxBase<Nullable<Vector>>.SmallIncrementValueCommand
- PartEditBoxBase<Nullable<Vector>>.SpinWrapping
- PartEditBoxBase<Nullable<Vector>>.TextAlignment
- PartEditBoxBase<Nullable<Vector>>.Value
- PartEditBoxBase<Nullable<Vector>>.IsNonDefaultUsageContext
- PartEditBoxBase<Nullable<Vector>>.SpinnerVisibility
- PartEditBoxBase<Nullable<Vector>>.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()