Skip to main content

SelectingItemsControlSelectionAdapter Class

Definition​

Assembly:Avalonia.Controls
Package:Avalonia

Represents the selection adapter contained in the drop-down portion of an Avalonia.Controls.AutoCompleteBox control.

public class SelectingItemsControlSelectionAdapter

Inheritance: object -> SelectingItemsControlSelectionAdapter

Constructors​

SelectingItemsControlSelectionAdapter overloads​

SelectingItemsControlSelectionAdapter Constructor​

Initializes a new instance of the Avalonia.Controls.Utils.SelectingItemsControlSelectionAdapter class.

public SelectingItemsControlSelectionAdapter()

SelectingItemsControlSelectionAdapter Constructor​

Initializes a new instance of the Avalonia.Controls.Utils.SelectingItemsControlSelectionAdapter class with the specified Avalonia.Controls.Primitives.SelectingItemsControl control.

public SelectingItemsControlSelectionAdapter(Avalonia.Controls.Primitives.SelectingItemsControl selector)
Parameters​

selector Avalonia.Controls.Primitives.SelectingItemsControl

The Avalonia.Controls.Primitives.SelectingItemsControl control to wrap as a Avalonia.Controls.Utils.SelectingItemsControlSelectionAdapter.

Methods​

NameDescription
HandleKeyDownProvides handling for the Avalonia.Input.InputElement.KeyDown event that occurs when a key is pressed while the drop-down portion of the Avalonia.Controls.AutoCompleteBox has focus.

HandleKeyDown Method​

Provides handling for the Avalonia.Input.InputElement.KeyDown event that occurs when a key is pressed while the drop-down portion of the Avalonia.Controls.AutoCompleteBox has focus.

public void HandleKeyDown(Avalonia.Input.KeyEventArgs e)

Parameters​

e Avalonia.Input.KeyEventArgs

A Avalonia.Input.KeyEventArgs that contains data about the Avalonia.Input.InputElement.KeyDown event.

Properties​

NameDescription
ItemsSourceGets or sets a collection that is used to generate the content of the selection adapter.
SelectedItemGets or sets the selected item of the selection adapter.
SelectorControlGets or sets the underlying Avalonia.Controls.Primitives.SelectingItemsControl control.

ItemsSource Property​

Gets or sets a collection that is used to generate the content of the selection adapter.

public System.Collections.IEnumerable ItemsSource { get; set; }

Value​

The collection used to generate content for the selection adapter.

SelectedItem Property​

Gets or sets the selected item of the selection adapter.

public object SelectedItem { get; set; }

Value​

The selected item of the underlying selection adapter.

SelectorControl Property​

Gets or sets the underlying Avalonia.Controls.Primitives.SelectingItemsControl control.

public Avalonia.Controls.Primitives.SelectingItemsControl SelectorControl { get; set; }

Value​

The underlying Avalonia.Controls.Primitives.SelectingItemsControl control.

Events​

NameDescription
CancelOccurs when a selection is canceled before it is committed.
CommitOccurs when an item is selected and is committed to the underlying Avalonia.Controls.Primitives.SelectingItemsControl control.
SelectionChangedOccurs when the Avalonia.Controls.Utils.SelectingItemsControlSelectionAdapter.SelectedItem property value changes.

Cancel Event​

Occurs when a selection is canceled before it is committed.

public event EventHandler<Avalonia.Interactivity.RoutedEventArgs> Cancel

Commit Event​

Occurs when an item is selected and is committed to the underlying Avalonia.Controls.Primitives.SelectingItemsControl control.

public event EventHandler<Avalonia.Interactivity.RoutedEventArgs> Commit

SelectionChanged Event​

Occurs when the Avalonia.Controls.Utils.SelectingItemsControlSelectionAdapter.SelectedItem property value changes.

public event EventHandler<Avalonia.Controls.SelectionChangedEventArgs> SelectionChanged