Class Picker
Base class for all controls that have popup functionality.
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Input.Toolkit.dll
Syntax
[TemplatePart(Name = "Popup", Type = typeof(Popup))]
[TemplatePart(Name = "DropDownToggle", Type = typeof(ToggleButton))]
public abstract class Picker : Control, IControl, IFrameworkElement, IUIElement, IDependencyObject
Constructors
| Improve this Doc View SourcePicker()
Initializes a new instance of the Picker class.
Declaration
protected Picker()
Fields
| Improve this Doc View SourceIsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaxDropDownHeightProperty
Identifies the MaxDropDownHeight dependency property.
Declaration
public static readonly DependencyProperty MaxDropDownHeightProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
PopupButtonModeProperty
Identifies the PopupButtonMode dependency property.
Declaration
public static readonly DependencyProperty PopupButtonModeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceIsDropDownOpen
Gets or sets a value indicating whether the drop-down portion of the control is open.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxDropDownHeight
Gets or sets the maximum height of the drop-down portion of the Picker control.
Declaration
public double MaxDropDownHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
PopupButtonMode
Gets or sets the button event that causes the popup portion of the Picker control to open.
Declaration
public ClickMode PopupButtonMode { get; set; }
Property Value
Type | Description |
---|---|
ClickMode |
PopupChild
Gets the element shown in the drop down portion of the Picker control.
Declaration
public FrameworkElement PopupChild { get; }
Property Value
Type | Description |
---|---|
FrameworkElement |
Methods
| Improve this Doc View SourceGetSelectedValue()
Gets the selected value represented in the control.
Declaration
public abstract object GetSelectedValue()
Returns
Type | Description |
---|---|
System.Object | The value that is picked. |
OnApplyTemplate()
Builds the visual tree for the Picker control when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnDropDownClosed(RoutedPropertyChangedEventArgs<Boolean>)
Raises the DropDownClosed event.
Declaration
protected virtual void OnDropDownClosed(RoutedPropertyChangedEventArgs<bool> e)
Parameters
Type | Name | Description |
---|---|---|
RoutedPropertyChangedEventArgs<System.Boolean> | e | The event data. |
OnDropDownClosing(RoutedPropertyChangingEventArgs<Boolean>)
Raises the DropDownClosing event.
Declaration
protected virtual void OnDropDownClosing(RoutedPropertyChangingEventArgs<bool> e)
Parameters
Type | Name | Description |
---|---|---|
RoutedPropertyChangingEventArgs<System.Boolean> | e | Provides any observers the opportunity to cancel the operation and halt closing the drop down. |
OnDropDownOpened(RoutedPropertyChangedEventArgs<Boolean>)
Raises the DropDownOpened event.
Declaration
protected virtual void OnDropDownOpened(RoutedPropertyChangedEventArgs<bool> e)
Parameters
Type | Name | Description |
---|---|---|
RoutedPropertyChangedEventArgs<System.Boolean> | e | The event data. |
OnDropDownOpening(RoutedPropertyChangingEventArgs<Boolean>)
Raises the DropDownOpening event.
Declaration
protected virtual void OnDropDownOpening(RoutedPropertyChangingEventArgs<bool> e)
Parameters
Type | Name | Description |
---|---|---|
RoutedPropertyChangingEventArgs<System.Boolean> | e | Provides any observers the opportunity to cancel the operation and halt opening the drop down. |
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
| Improve this Doc View SourceOnLostFocus(RoutedEventArgs)
Provides handling for the LostFocus event.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
RoutedEventArgs | e | The event data. |
Overrides
| Improve this Doc View SourceOnMouseEnter(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
| Improve this Doc View SourceOnMouseLeave(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
| Improve this Doc View SourceOnMouseLeftButtonDown(MouseButtonEventArgs)
Called before the MouseLeftButtonDown event occurs.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
MouseButtonEventArgs | e | The data for the event. |
Overrides
| Improve this Doc View SourceOnMouseLeftButtonUp(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
Events
| Improve this Doc View SourceDropDownClosed
Occurs when the IsDropDownOpen property was changed from true to false and the drop-down is open.
Declaration
public event RoutedPropertyChangedEventHandler<bool> DropDownClosed
Event Type
Type | Description |
---|---|
RoutedPropertyChangedEventHandler<System.Boolean> |
DropDownClosing
Occurs when the IsDropDownOpen property is changing from true to false.
Declaration
public event RoutedPropertyChangingEventHandler<bool> DropDownClosing
Event Type
Type | Description |
---|---|
RoutedPropertyChangingEventHandler<System.Boolean> |
DropDownOpened
Occurs when the value of the IsDropDownOpen property has changed from false to true and the drop-down is open.
Declaration
public event RoutedPropertyChangedEventHandler<bool> DropDownOpened
Event Type
Type | Description |
---|---|
RoutedPropertyChangedEventHandler<System.Boolean> |
DropDownOpening
Occurs when the value of the IsDropDownOpen property is changing from false to true.
Declaration
public event RoutedPropertyChangingEventHandler<bool> DropDownOpening
Event Type
Type | Description |
---|---|
RoutedPropertyChangingEventHandler<System.Boolean> |