Table of Contents

Class ListBoxItem

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

A selectable item in a ListBox.

[PseudoClasses(new string[] { ":pressed", ":selected" })]
public class ListBoxItem : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, ISelectable
Inheritance
ListBoxItem
Implements
Derived
Inherited Members
Extension Methods

Constructors

ListBoxItem()

public ListBoxItem()

Fields

IsSelectedProperty

Defines the IsSelected property.

public static readonly StyledProperty<bool> IsSelectedProperty

Field Value

StyledProperty<bool>

Properties

IsSelected

Gets or sets the selection state of the item.

public bool IsSelected { get; set; }

Property Value

bool

Methods

OnCreateAutomationPeer()

Returns a new, type-specific AutomationPeer implementation for the control.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

OnPointerPressed(PointerPressedEventArgs)

Called before the PointerPressed event occurs.

protected override void OnPointerPressed(PointerPressedEventArgs e)

Parameters

e PointerPressedEventArgs

The event args.

OnPointerReleased(PointerReleasedEventArgs)

Called before the PointerReleased event occurs.

protected override void OnPointerReleased(PointerReleasedEventArgs e)

Parameters

e PointerReleasedEventArgs

The event args.