Class SelectingItemsControlSelectionAdapter
Represents the selection adapter contained in the drop-down portion of an AutoCompleteBox control.
public class SelectingItemsControlSelectionAdapter : ISelectionAdapter
- Inheritance
-
SelectingItemsControlSelectionAdapter
- Implements
- Inherited Members
Constructors
SelectingItemsControlSelectionAdapter()
Initializes a new instance of the SelectingItemsControlSelectionAdapter class.
public SelectingItemsControlSelectionAdapter()
SelectingItemsControlSelectionAdapter(SelectingItemsControl)
Initializes a new instance of the Avalonia.Controls.Utils.SelectingItemsControlSelectionAdapterr class with the specified SelectingItemsControl control.
public SelectingItemsControlSelectionAdapter(SelectingItemsControl selector)
Parameters
selector
SelectingItemsControlThe SelectingItemsControl control to wrap as a SelectingItemsControlSelectionAdapter.
Properties
ItemsSource
Gets or sets a collection that is used to generate the content of the selection adapter.
public IEnumerable? ItemsSource { get; set; }
Property Value
- IEnumerable
The collection used to generate content for the selection adapter.
SelectedItem
Gets or sets the selected item of the selection adapter.
public object? SelectedItem { get; set; }
Property Value
- object
The selected item of the underlying selection adapter.
SelectorControl
Gets or sets the underlying SelectingItemsControl control.
public SelectingItemsControl? SelectorControl { get; set; }
Property Value
- SelectingItemsControl
The underlying SelectingItemsControl control.
Methods
HandleKeyDown(KeyEventArgs)
Provides handling for the KeyDown event that occurs when a key is pressed while the drop-down portion of the AutoCompleteBox has focus.
public void HandleKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgsA KeyEventArgs that contains data about the KeyDown event.
OnCancel()
Raises the Cancel event.
protected virtual void OnCancel()
OnCommit()
Raises the Commit event.
protected virtual void OnCommit()
SelectedIndexDecrement()
Decrements the SelectedIndex property of the underlying SelectingItemsControl control.
protected void SelectedIndexDecrement()
SelectedIndexIncrement()
Increments the SelectedIndex property of the underlying SelectingItemsControl control.
protected void SelectedIndexIncrement()
Events
Cancel
Occurs when a selection is canceled before it is committed.
public event EventHandler<RoutedEventArgs>? Cancel
Event Type
Commit
Occurs when an item is selected and is committed to the underlying SelectingItemsControl control.
public event EventHandler<RoutedEventArgs>? Commit
Event Type
SelectionChanged
Occurs when the SelectedItem property value changes.
public event EventHandler<SelectionChangedEventArgs>? SelectionChanged