ISelectionAdapter Interface
Definition
Defines an item collection, selection members, and key handling for the selection adapter contained in the drop-down portion of an Avalonia.Controls.AutoCompleteBox control.
public interface ISelectionAdapter
Methods
| Name | Description |
|---|---|
| HandleKeyDown | 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. |
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
A Avalonia.Input.KeyEventArgs that contains data about the Avalonia.Input.InputElement.KeyDown event.
Properties
| Name | Description |
|---|---|
| ItemsSource | Gets or sets a collection that is used to generate content for the selection adapter. |
| SelectedItem | Gets or sets the selected item. |
ItemsSource Property
Gets or sets a collection that is used to generate content for the selection adapter.
public System.Collections.IEnumerable ItemsSource { get; set; }
Value
The collection that is used to generate content for the selection adapter.
SelectedItem Property
Gets or sets the selected item.
public object SelectedItem { get; set; }
Value
The currently selected item.
Events
| Name | Description |
|---|---|
| Cancel | Occurs when a selection has been canceled. |
| Commit | Occurs when a selected item is not cancelled and is committed as the selected item. |
| SelectionChanged | Occurs when the Avalonia.Controls.Utils.ISelectionAdapter.SelectedItem property value changes. |
Cancel Event
Occurs when a selection has been canceled.
public event EventHandler<Avalonia.Interactivity.RoutedEventArgs> Cancel
Commit Event
Occurs when a selected item is not cancelled and is committed as the selected item.
public event EventHandler<Avalonia.Interactivity.RoutedEventArgs> Commit
SelectionChanged Event
Occurs when the Avalonia.Controls.Utils.ISelectionAdapter.SelectedItem property value changes.
public event EventHandler<Avalonia.Controls.SelectionChangedEventArgs> SelectionChanged