Show / Hide Table of Contents

Class DomainUpDown

Represents a control that enables single value selection from a domain of values through a Spinner and TextBox.

Inheritance
System.Object
DependencyObject
UIElement
FrameworkElement
Control
UpDownBase
UpDownBase<System.Object>
DomainUpDown
Inherited Members
UpDownBase<Object>.Value
UpDownBase<Object>.ValueProperty
UpDownBase<Object>.IsEditable
UpDownBase<Object>.IsEditableProperty
UpDownBase<Object>.ValueChanging
UpDownBase<Object>.ValueChanged
UpDownBase<Object>.Parsing
UpDownBase<Object>.ParseError
UpDownBase<Object>.GetValue()
UpDownBase<Object>.SetValue(Object)
UpDownBase<Object>.OnMouseWheel(MouseWheelEventArgs)
UpDownBase<Object>.OnParseError(UpDownParseErrorEventArgs)
UpDownBase<Object>.OnParsing(UpDownParsingEventArgs<Object>)
UpDownBase<Object>.OnSpin(SpinEventArgs)
UpDownBase<Object>.OnIsEditableChanged(Boolean, Boolean)
UpDownBase.SpinnerStyle
UpDownBase.SpinnerStyleProperty
UpDownBase.OnSpinnerStyleChanged(Style, Style)
Control.EnableBaseControlHandlingOfVisualStates
Control.ManageIsEnabled(Boolean)
Control.Background
Control.BackgroundProperty
Control.BorderBrush
Control.BorderBrushProperty
Control.BorderThickness
Control.BorderThicknessProperty
Control.FontWeight
Control.FontWeightProperty
Control.FontStyle
Control.FontStyleProperty
Control.Foreground
Control.ForegroundProperty
Control.FontFamily
Control.FontFamilyProperty
Control.FontSize
Control.FontSizeProperty
Control.TextDecorations
Control.TextDecorationsProperty
Control.Padding
Control.PaddingProperty
Control.HorizontalContentAlignment
Control.HorizontalContentAlignmentProperty
Control.VerticalContentAlignment
Control.VerticalContentAlignmentProperty
Control.TabIndex
Control.TabIndexProperty
Control.IsTabStop
Control.IsTabStopProperty
Control.TabNavigation
Control.TabNavigationProperty
Control.Template
Control.TemplateProperty
Control.ApplyTemplate()
Control.GetTemplateChild(String)
Control.Focus()
Control.HandlesScrolling
Control.CreateDomElement(Object, Object)
Control.CharacterSpacingProperty
Control.CharacterSpacing
Control.FontStretchProperty
Control.FontStretch
Control.OnDrop(DragEventArgs)
Control.OnDragEnter(DragEventArgs)
Control.OnDragLeave(DragEventArgs)
Control.OnTextInputUpdate(TextCompositionEventArgs)
Control.MeasureOverride(Size)
Control.ArrangeOverride(Size)
FrameworkElement.LayoutUpdated
FrameworkElement.SizeChanged
FrameworkElement.ResourceLookupMode
FrameworkElement.StyleProperty
FrameworkElement.Style
FrameworkElement.DefaultStyleKeyProperty
FrameworkElement.DefaultStyleKey
FrameworkElement.OverridesDefaultStyleProperty
FrameworkElement.OverridesDefaultStyle
FrameworkElement.OnVisualParentChanged(DependencyObject)
FrameworkElement.VisualChildrenCount
FrameworkElement.GetVisualChild(Int32)
FrameworkElement.Parent
FrameworkElement.AddLogicalChild(Object)
FrameworkElement.RemoveLogicalChild(Object)
FrameworkElement.LogicalChildren
FrameworkElement.TemplatedParent
FrameworkElement.Resources
FrameworkElement.IsLoaded
FrameworkElement.SetBinding(DependencyProperty, BindingBase)
FrameworkElement.SetBinding(DependencyProperty, Binding)
FrameworkElement.GetBindingExpression(DependencyProperty)
FrameworkElement.Cursor
FrameworkElement.CursorProperty
FrameworkElement.FindName(String)
FrameworkElement.Name
FrameworkElement.NameProperty
FrameworkElement.DataContext
FrameworkElement.DataContextProperty
FrameworkElement.DataContextChanged
FrameworkElement.Triggers
FrameworkElement.FlowDirectionProperty
FrameworkElement.FlowDirection
FrameworkElement.LanguageProperty
FrameworkElement.Language
FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs)
FrameworkElement.Tag
FrameworkElement.TagProperty
FrameworkElement.LoadedEvent
FrameworkElement.Loaded
FrameworkElement.Unloaded
FrameworkElement.BindingValidationError
FrameworkElement.ContextMenuProperty
FrameworkElement.ContextMenu
FrameworkElement.ContextMenuOpening
FrameworkElement.ToolTipProperty
FrameworkElement.ToolTip
FrameworkElement.INTERNAL_OnDetachedFromVisualTree()
FrameworkElement.INTERNAL_OnAttachedToVisualTree()
FrameworkElement.Height
FrameworkElement.HeightProperty
FrameworkElement.Width
FrameworkElement.WidthProperty
FrameworkElement.HorizontalAlignment
FrameworkElement.HorizontalAlignmentProperty
FrameworkElement.VerticalAlignment
FrameworkElement.VerticalAlignmentProperty
FrameworkElement.Margin
FrameworkElement.MarginProperty
FrameworkElement.MinHeight
FrameworkElement.MinHeightProperty
FrameworkElement.MinWidth
FrameworkElement.MinWidthProperty
FrameworkElement.MaxHeight
FrameworkElement.MaxHeightProperty
FrameworkElement.MaxWidth
FrameworkElement.MaxWidthProperty
FrameworkElement.ActualWidthProperty
FrameworkElement.ActualWidth
FrameworkElement.ActualHeightProperty
FrameworkElement.ActualHeight
UIElement.TransformToVisual(UIElement)
UIElement.RenderSize
UIElement.DesiredSize
UIElement.InvalidateMeasure()
UIElement.InvalidateArrange()
UIElement.Measure(Size)
UIElement.Arrange(Rect)
UIElement.UpdateLayout()
UIElement.DragEnter
UIElement.DragLeave
UIElement.Drop
UIElement.DragOver
UIElement.CacheMode
UIElement.CacheModeProperty
UIElement.Projection
UIElement.ProjectionProperty
UIElement.VisualParent
UIElement.AddVisualChild(UIElement)
UIElement.RemoveVisualChild(UIElement)
UIElement.OnVisualChildrenChanged(DependencyObject, DependencyObject)
UIElement.XamlSourcePath
UIElement.ClipToBounds
UIElement.ClipToBoundsProperty
UIElement.ClipProperty
UIElement.Clip
UIElement.IsEnabledProperty
UIElement.IsEnabled
UIElement.IsEnabledChanged
UIElement.EffectProperty
UIElement.Effect
UIElement.RenderTransformProperty
UIElement.RenderTransform
UIElement.RenderTransformOriginProperty
UIElement.RenderTransformOrigin
UIElement.UseLayoutRounding
UIElement.UseLayoutRoundingProperty
UIElement.Visibility
UIElement.VisibilityProperty
UIElement.IsVisibleProperty
UIElement.IsVisible
UIElement.IsVisibleChanged
UIElement.OpacityProperty
UIElement.Opacity
UIElement.OpacityMaskProperty
UIElement.OpacityMask
UIElement.IsHitTestVisible
UIElement.IsHitTestVisibleProperty
UIElement.AllowDrop
UIElement.AllowDropProperty
UIElement.CaptureMouse()
UIElement.IsMouseCaptured
UIElement.ReleaseMouseCapture()
UIElement.AllowScrollOnTouchMove
UIElement.AllowScrollOnTouchMoveProperty
UIElement.AddHandler(RoutedEvent, Delegate, Boolean)
UIElement.RemoveHandler(RoutedEvent, Delegate)
UIElement.MouseMoveEvent
UIElement.MouseMove
UIElement.OnMouseMove(MouseEventArgs)
UIElement.MouseLeftButtonDownEvent
UIElement.MouseLeftButtonDown
UIElement.MouseRightButtonDownEvent
UIElement.MouseRightButtonDown
UIElement.OnMouseRightButtonDown(MouseButtonEventArgs)
UIElement.MouseWheelEvent
UIElement.MouseWheel
UIElement.MouseLeftButtonUpEvent
UIElement.MouseLeftButtonUp
UIElement.MouseEnterEvent
UIElement.MouseEnter
UIElement.MouseLeaveEvent
UIElement.MouseLeave
UIElement.TextInputStartEvent
UIElement.TextInputStart
UIElement.OnTextInputStart(TextCompositionEventArgs)
UIElement.TextInputEvent
UIElement.TextInput
UIElement.OnTextInput(TextCompositionEventArgs)
UIElement.TextInputUpdateEvent
UIElement.TextInputUpdate
UIElement.TappedEvent
UIElement.Tapped
UIElement.OnTapped(TappedRoutedEventArgs)
UIElement.MouseRightButtonUpEvent
UIElement.MouseRightButtonUp
UIElement.OnMouseRightButtonUp(MouseButtonEventArgs)
UIElement.KeyDownEvent
UIElement.KeyDown
UIElement.KeyUpEvent
UIElement.KeyUp
UIElement.OnKeyUp(KeyEventArgs)
UIElement.GotFocusEvent
UIElement.GotFocus
UIElement.LostFocusEvent
UIElement.LostFocus
UIElement.LostMouseCapture
UIElement.OnLostMouseCapture(MouseEventArgs)
UIElement.INTERNAL_AttachToDomEvents()
UIElement.INTERNAL_DetachFromDomEvents()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Input.Toolkit.dll
Syntax
[TemplatePart(Name = "Text", Type = typeof(TextBox))]
[TemplatePart(Name = "Spinner", Type = typeof(Spinner))]
[StyleTypedProperty(Property = "SpinnerStyle", StyleTargetType = typeof(ButtonSpinner))]
public class DomainUpDown : UpDownBase<object>, IControl, IFrameworkElement, IUIElement, IDependencyObject

Constructors

| Improve this Doc View Source

DomainUpDown()

Initializes a new instance of the DomainUpDown class.

Declaration
public DomainUpDown()

Fields

| Improve this Doc View Source

CurrentIndexProperty

Identifies the CurrentIndex dependency property.

Declaration
public static readonly DependencyProperty CurrentIndexProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

FallbackItemProperty

Identifies the FallbackItem dependency property.

Declaration
public static readonly DependencyProperty FallbackItemProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

GroupDomain

Domain state group.

Declaration
public const string GroupDomain = "DomainStates"
Field Value
Type Description
System.String
| Improve this Doc View Source

InvalidInputActionProperty

Identifies the InvalidInputAction dependency property.

Declaration
public static readonly DependencyProperty InvalidInputActionProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

IsCyclicProperty

Identifies the IsCyclic dependency property.

Declaration
public static readonly DependencyProperty IsCyclicProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ItemTemplateProperty

Identifies the ItemTemplate dependency property.

Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

StateInvalid

InvalidDomain of the Domain state group.

Declaration
public const string StateInvalid = "InvalidDomain"
Field Value
Type Description
System.String
| Improve this Doc View Source

StateValid

Valid of the Domain state group.

Declaration
public const string StateValid = "ValidDomain"
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

CurrentIndex

Gets or sets the index of the current selected item.

Declaration
public int CurrentIndex { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

FallbackItem

Gets or sets the item that is used when a user attempts to set a value not included in the domain.

Declaration
public object FallbackItem { get; set; }
Property Value
Type Description
System.Object
Remarks

FallbackItem will only be used if it is contained within the Items collection.

| Improve this Doc View Source

InvalidInputAction

Gets or sets a value determining the DomainUpDown behavior when a user sets a value not included in the domain.

Declaration
public InvalidInputAction InvalidInputAction { get; set; }
Property Value
Type Description
InvalidInputAction
| Improve this Doc View Source

IsCyclic

Gets or sets a value indicating whether the DomainUpDown control will cycle through values when trying to spin the first and last item.

Declaration
public bool IsCyclic { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsEditing

Gets a value indicating whether the control is in EditMode.

Declaration
public bool IsEditing { get; }
Property Value
Type Description
System.Boolean

True if currently in edit mode; otherwise, False.

| Improve this Doc View Source

Items

Gets a collection of items which represent the domain in the DomainUpDown control.

Declaration
public ObservableObjectCollection Items { get; }
Property Value
Type Description
ObservableObjectCollection

The items.

Remarks

When ItemsSource is set, will return a copy of the items in ItemsSource. When ItemsSource property is not set (set to null) this collection will return an empty writeable colection.

| Improve this Doc View Source

ItemsSource

Gets or sets a collection of items which represent the domain in the DomainUpDown control.

Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
Type Description
System.Collections.IEnumerable
| Improve this Doc View Source

ItemTemplate

Gets or sets the DataTemplate used to display an item from the Domain when the item is selected.

Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
Type Description
DataTemplate
| Improve this Doc View Source

ValueMemberBinding

Gets or sets the Binding object used for object to string conversions.

Declaration
public Binding ValueMemberBinding { get; set; }
Property Value
Type Description
Binding
| Improve this Doc View Source

ValueMemberPath

Gets or sets the Binding Path to use for identifying the value.

Declaration
public string ValueMemberPath { get; set; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

ApplyValue(String)

Processes user input when the TextBox.TextChanged event occurs.

Declaration
protected override void ApplyValue(string text)
Parameters
Type Name Description
System.String text

User input.

Overrides
System.Windows.Controls.UpDownBase<System.Object>.ApplyValue(System.String)
| Improve this Doc View Source

FormatValue()

Renders the value property into the textbox text.

Declaration
protected override string FormatValue()
Returns
Type Description
System.String

Formatted Value.

Overrides
System.Windows.Controls.UpDownBase<System.Object>.FormatValue()
| Improve this Doc View Source

OnApplyTemplate()

Builds the visual tree for the DomainUpDown control when a new template is applied.

Declaration
public override void OnApplyTemplate()
Overrides
System.Windows.Controls.UpDownBase<System.Object>.OnApplyTemplate()
| Improve this Doc View Source

OnCreateAutomationPeer()

Returns a DomainUpDownAutomationPeer for use by the Silverlight automation infrastructure.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type Description
AutomationPeer

The class-specific AutomationPeer subclass to return.

Overrides
UIElement.OnCreateAutomationPeer()
| Improve this Doc View Source

OnCurrentIndexChanged(Int32, Int32)

Processes changes to the CurrentIndex property.

Declaration
protected virtual void OnCurrentIndexChanged(int oldValue, int newValue)
Parameters
Type Name Description
System.Int32 oldValue

The old value of CurrentIndex.

System.Int32 newValue

The new value of CurrentIndex.

| Improve this Doc View Source

OnDecrement()

Called by OnSpin when the spin direction is SpinDirection.Decrease.

Declaration
protected override void OnDecrement()
Overrides
System.Windows.Controls.UpDownBase<System.Object>.OnDecrement()
Remarks

If the IsCyclic property is set to true the DomainUpDown control will not decrement when the selected item is the first item.

| Improve this Doc View Source

OnGotFocus(RoutedEventArgs)

Provides handling for the GotFocus event.

Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type Name Description
RoutedEventArgs e

The data for the event.

Overrides
Control.OnGotFocus(RoutedEventArgs)
| Improve this Doc View Source

OnIncrement()

Called by OnSpin when the spin direction is SpinDirection.Increase.

Declaration
protected override void OnIncrement()
Overrides
System.Windows.Controls.UpDownBase<System.Object>.OnIncrement()
Remarks

If the IsCyclic property is set to true the DomainUpDown control will not increment when the selected item is the last item.

| Improve this Doc View Source

OnKeyDown(KeyEventArgs)

Provides handling for the KeyDown event.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type Name Description
KeyEventArgs e

Key event args.

Overrides
System.Windows.Controls.UpDownBase<System.Object>.OnKeyDown(System.Windows.Input.KeyEventArgs)
| Improve this Doc View Source

OnLostFocus(RoutedEventArgs)

Provides handling for the LostFocus event.

Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type Name Description
RoutedEventArgs e

The data for the event.

Overrides
Control.OnLostFocus(RoutedEventArgs)
| Improve this Doc View Source

OnMouseEnter(MouseEventArgs)

Provides handling for the MouseEnter event.

Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type Name Description
MouseEventArgs e

The data for the event.

Overrides
UIElement.OnMouseEnter(MouseEventArgs)
| Improve this Doc View Source

OnMouseLeave(MouseEventArgs)

Provides handling for the MouseLeave event.

Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type Name Description
MouseEventArgs e

The data for the event.

Overrides
UIElement.OnMouseLeave(MouseEventArgs)
| Improve this Doc View Source

OnMouseLeftButtonDown(MouseButtonEventArgs)

Provides handling for the MouseLeftButtonDown event.

Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type Name Description
MouseButtonEventArgs e

The data for the event.

Overrides
UIElement.OnMouseLeftButtonDown(MouseButtonEventArgs)
| Improve this Doc View Source

OnMouseLeftButtonUp(MouseButtonEventArgs)

Called before the MouseLeftButtonUp event occurs.

Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type Name Description
MouseButtonEventArgs e

The data for the event.

Overrides
UIElement.OnMouseLeftButtonUp(MouseButtonEventArgs)
| Improve this Doc View Source

OnValueChanged(RoutedPropertyChangedEventArgs<Object>)

Raises the ValueChanged event when Value property has changed.

Declaration
protected override void OnValueChanged(RoutedPropertyChangedEventArgs<object> e)
Parameters
Type Name Description
RoutedPropertyChangedEventArgs<System.Object> e

Event args.

Overrides
System.Windows.Controls.UpDownBase<System.Object>.OnValueChanged(System.Windows.RoutedPropertyChangedEventArgs<System.Object>)
Remarks

Will set CurrentIndex.

| Improve this Doc View Source

OnValueChanging(RoutedPropertyChangingEventArgs<Object>)

Raises the ValueChanging event when Value property is changing.

Declaration
protected override void OnValueChanging(RoutedPropertyChangingEventArgs<object> e)
Parameters
Type Name Description
RoutedPropertyChangingEventArgs<System.Object> e

Event args.

Overrides
System.Windows.Controls.UpDownBase<System.Object>.OnValueChanging(System.Windows.Controls.RoutedPropertyChangingEventArgs<System.Object>)
Remarks

Cancels the event when the value is not part of the domain.

| Improve this Doc View Source

ParseValue(String)

Called by ApplyValue to parse user input as a value in the domain.

Declaration
protected override object ParseValue(string text)
Parameters
Type Name Description
System.String text

User input.

Returns
Type Description
System.Object

Value parsed from user input.

Overrides
System.Windows.Controls.UpDownBase<System.Object>.ParseValue(System.String)
Remarks

An empty string will return the currently selected value.

| Improve this Doc View Source

SelectAllText()

Selects all text.

Declaration
protected override void SelectAllText()
Overrides
System.Windows.Controls.UpDownBase<System.Object>.SelectAllText()

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
UIElementExtendedRoutedEventExtensions.AddHandler(UIElement, ExtendedRoutedEvent, Delegate, Boolean)
UIElementExtendedRoutedEventExtensions.RemoveHandler(UIElement, ExtendedRoutedEvent, Delegate)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
VisualTreeExtensions.GetBoundsRelativeTo(FrameworkElement, UIElement)
VisualTreeExtensions.InvokeOnLayoutUpdated(FrameworkElement, Action)
  • Improve this Doc
  • View Source