New to Telerik UI for WPFStart a free 30-day trial

Represents a selectable item within the RadListBox control, which allows users to select and interact with items in a list. The RadListBoxItem class supports various visual states such as Normal, MouseOver, Disabled, Selected, and Unselected, enabling dynamic styling based on user interactions. This class also integrates with the UI Automation framework to improve accessibility. It can be customized through templates and extends the functionality of list items in applications built using Telerik controls.

Definition

Constructors

Initializes a new instance of the RadListBoxItem class.

C#
public RadListBoxItem()

Methods

Changes the visual state.

C#
protected override void ChangeVisualState(bool useTransitions)
Parameters:useTransitionsbool

If set to true [use transitions].

Overrides: ListItem.ChangeVisualState(bool)

When overridden in a derived class, is invoked whenever application code or internal processes call .

C#
public override void OnApplyTemplate()

Overrides: ListItem.OnApplyTemplate()

Called by the Automation infrastructure when AutomationPeer is requested for this element. The element can return null or the instance of AutomationPeer-derived class, if it supports UI Automation.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Called when IsSelected property is changed.

C#
protected override void OnIsSelectedChanged()

Overrides: ListItem.OnIsSelectedChanged()

Invoked when an unhandled  attached event is raised on this element. Implement this method to add class handling for this event.

C#
protected override void OnMouseEnter(MouseEventArgs e)
Parameters:eMouseEventArgs

The MouseEventArgs that contains the event data.

Overrides: ListItem.OnMouseEnter(MouseEventArgs)

Invoked when an unhandled  attached event is raised on this element. Implement this method to add class handling for this event.

C#
protected override void OnMouseLeave(MouseEventArgs e)
Parameters:eMouseEventArgs

The MouseEventArgs that contains the event data.

Overrides: ListItem.OnMouseLeave(MouseEventArgs)