Class Selector
Implementation of abstract base features for controls that allows item selection
Inheritance
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls.Primitives
Assembly: EmptyKeys.UserInterface.dll
Syntax
public abstract class Selector : ItemsControl
Constructors
Selector()
Initializes a new instance of the Selector class.
Declaration
protected Selector()
Fields
IsSelectedProperty
Is Selected Attached property
Declaration
public static readonly DependencyProperty IsSelectedProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectedEvent
The selected event
Declaration
public static readonly RoutedEvent SelectedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
SelectedIndexProperty
The selected index property
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectedItemProperty
The selected item property
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectionChangedEvent
The selection changed event
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
UnselectedEvent
The unselected event
Declaration
public static readonly RoutedEvent UnselectedEvent
Field Value
Type | Description |
---|---|
RoutedEvent |
Properties
SelectedIndex
Gets or sets the index of the selected item
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the selected item |
SelectedItem
Gets or sets the selected item.
Declaration
public object SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The selected item. |
Methods
AddSelectedHandler(UIElement, RoutedEventHandler)
Adds the selected event handler.
Declaration
public static void AddSelectedHandler(UIElement element, RoutedEventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element. |
RoutedEventHandler | handler | The handler. |
AddUnselectedHandler(UIElement, RoutedEventHandler)
Adds the unselected event handler.
Declaration
public static void AddUnselectedHandler(UIElement element, RoutedEventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element. |
RoutedEventHandler | handler | The handler. |
BringTargetIntoView(UIElement, ScrollViewer)
Implements generic bring target into view
Declaration
protected void BringTargetIntoView(UIElement targetObject, ScrollViewer dataScrollViewer)
Parameters
Type | Name | Description |
---|---|---|
UIElement | targetObject | target object |
ScrollViewer | dataScrollViewer | scroll viewer |
GetIsSelected(DependencyObject)
Gets the IsSelected for specified item
Declaration
public static bool GetIsSelected(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
Returns
Type | Description |
---|---|
System.Boolean |
OnSelectedItemChanged(DependencyPropertyChangedEventArgs)
Raises the SelectedItemChanged event.
Declaration
protected virtual void OnSelectedItemChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
OnSelectionChanged(SelectionChangedEventArgs)
Raises the SelectionChanged event.
Declaration
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
SelectionChangedEventArgs | e | The SelectionChangedEventArgs instance containing the event data. |
RemoveSelectedHandler(UIElement, RoutedEventHandler)
Removes the selected event handler.
Declaration
public static void RemoveSelectedHandler(UIElement element, RoutedEventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element. |
RoutedEventHandler | handler | The handler. |
RemoveUnselectedHandler(UIElement, RoutedEventHandler)
Removes the unselected event handler.
Declaration
public static void RemoveUnselectedHandler(UIElement element, RoutedEventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | The element. |
RoutedEventHandler | handler | The handler. |
SetIsSelected(DependencyObject, Boolean)
Sets the IsSelected for specified item
Declaration
public static void SetIsSelected(DependencyObject obj, bool value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
System.Boolean | value | if set to |
UpdatePublicSelectionProperties()
Updates the public selection properties.
Declaration
protected void UpdatePublicSelectionProperties()
Events
SelectionChanged
Occurs when [selection changed].
Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Type
Type | Description |
---|---|
SelectionChangedEventHandler |