Class ListBoxItem
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
Properties
IsSelected
Gets or sets the selection state of the item.
public bool IsSelected { get; set; }
Property Value
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
PointerPressedEventArgsThe event args.
OnPointerReleased(PointerReleasedEventArgs)
Called before the PointerReleased event occurs.
protected override void OnPointerReleased(PointerReleasedEventArgs e)
Parameters
e
PointerReleasedEventArgsThe event args.