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