Class ListBox
Implements selector control with selectable list of items
Inherited Members
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class ListBox : Selector
Constructors
ListBox()
Initializes a new instance of the ListBox class.
Declaration
public ListBox()
Fields
EnableVirtualizationProperty
The enable virtualization property
Declaration
public static readonly DependencyProperty EnableVirtualizationProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
IsSelectedDataEnabledProperty
The is selected data enabled property
Declaration
public static readonly DependencyProperty IsSelectedDataEnabledProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectedItemsProperty
The selected items property
Declaration
public static readonly DependencyProperty SelectedItemsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SelectionModeProperty
The selection mode property
Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
VirtualizedCacheMaxItemsProperty
The virtualized cache maximum items property
Declaration
public static readonly DependencyProperty VirtualizedCacheMaxItemsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
SelectedItems
Gets the selected items.
Declaration
public IList SelectedItems { get; }
Property Value
Type | Description |
---|---|
System.Collections.IList | The selected items. |
SelectionMode
Gets or sets the selection mode.
Declaration
public SelectionMode SelectionMode { get; set; }
Property Value
Type | Description |
---|---|
SelectionMode | The selection mode. |
Methods
GetContainerForItemOverride(Object)
Gets the container for item override.
Declaration
protected override UIElement GetContainerForItemOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item. |
Returns
Type | Description |
---|---|
UIElement |
Overrides
GetEnableVirtualization(DependencyObject)
Gets the enable virtualization.
Declaration
public static bool GetEnableVirtualization(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
Returns
Type | Description |
---|---|
System.Boolean |
GetIsSelectedDataEnabled(DependencyObject)
Gets the is selected data enabled.
Declaration
public static bool GetIsSelectedDataEnabled(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
Returns
Type | Description |
---|---|
System.Boolean |
GetVirtualizedCacheMaxItems(DependencyObject)
Gets the virtualized cache maximum items.
Declaration
public static int GetVirtualizedCacheMaxItems(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
Returns
Type | Description |
---|---|
System.Int32 |
IsItemItsOwnContainerOverride(Object)
Determines whether if [is item its own container override].
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
OnApplyTemplate()
Called when [apply template].
Declaration
public override void OnApplyTemplate()
Overrides
OnItemInserted(Int32)
Called when [item inserted].
Declaration
protected override void OnItemInserted(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Overrides
OnItemRemoved()
Called when [item removed].
Declaration
protected override void OnItemRemoved()
Overrides
OnItemsCleared()
Called when [items cleared].
Declaration
protected override void OnItemsCleared()
Overrides
OnItemsSourceChanged(DependencyPropertyChangedEventArgs)
Raises the ItemsSourceChanged event.
Declaration
protected override void OnItemsSourceChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
Overrides
OnKeyDown(KeyEventArgs)
Raises the KeyDown event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
KeyEventArgs | e | The KeyEventArgs instance containing the event data. |
Overrides
OnPreviewGamepadMove(Object, GamepadMoveEventArgs)
Called when [preview game pad move].
Declaration
protected override void OnPreviewGamepadMove(object sender, GamepadMoveEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
GamepadMoveEventArgs | e | The GamepadMoveEventArgs instance containing the event data. |
Overrides
OnPreviewMouseWheel(Object, MouseWheelEventArgs)
Called when [preview mouse wheel].
Declaration
protected override void OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
MouseWheelEventArgs | e | The MouseWheelEventArgs instance containing the event data. |
Overrides
OnSelectedItemChanged(DependencyPropertyChangedEventArgs)
Raises the SelectedItemChanged event.
Declaration
protected override void OnSelectedItemChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
DependencyPropertyChangedEventArgs | e | The DependencyPropertyChangedEventArgs instance containing the event data. |
Overrides
ScrollIntoView(Object)
Scrolls the into view.
Declaration
public void ScrollIntoView(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item. |
SetContainer(UIElement, UIElement)
Sets the container.
Declaration
protected override void SetContainer(UIElement itemContainer, UIElement contentVisual)
Parameters
Type | Name | Description |
---|---|---|
UIElement | itemContainer | The item container. |
UIElement | contentVisual | The content visual. |
Overrides
SetEnableVirtualization(DependencyObject, Boolean)
Sets the enable virtualization.
Declaration
public static void SetEnableVirtualization(DependencyObject obj, bool value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
System.Boolean | value | if set to |
SetIsSelectedDataEnabled(DependencyObject, Boolean)
Sets the is selected data enabled.
Declaration
public static void SetIsSelectedDataEnabled(DependencyObject obj, bool value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
System.Boolean | value | if set to |
SetVirtualizedCacheMaxItems(DependencyObject, Int32)
Sets the virtualized cache maximum items.
Declaration
public static void SetVirtualizedCacheMaxItems(DependencyObject obj, int value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | obj | The object. |
System.Int32 | value | The value. |
UnselectAll()
Unselects all.
Declaration
public void UnselectAll()