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

Represents a item in a Telerik.Windows.Controls.Primitives.ListControl.

Definition

Namespace:Telerik.Windows.Controls.Primitives

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public class ListItem : ContentControl, ISelectorItem

Inheritance: objectListItem

Derived Classes: RadListBoxItem

Implements: ISelectorItem

Constructors

Initializes a new instance of the ListItem class.

C#
public ListItem()

Fields

IsHighlightedProperty

DependencyProperty

Identifies the IsHighlighted property.

C#
public static readonly DependencyProperty IsHighlightedProperty

IsSelectedProperty

DependencyProperty

Identifies the IsSelected�dependency property.

C#
public static readonly DependencyProperty IsSelectedProperty

Properties

Gets or sets a value indicating whether this instance is highlighted.

C#
public bool IsHighlighted { get; set; }

Gets or sets a value indicating whether this instance is selected.

C#
public bool IsSelected { get; set; }

Implements: ISelectorItem.IsSelected

Gets the parent selector.

C#
public ListControl ParentSelector { get; }

Methods

Changes the visual state.

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

If set to true [use transitions].

Updates the visual state.

C#
protected void GoToState(bool useTransitions, params string[] stateNames)
Parameters:useTransitionsboolstateNamesstring[]

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

C#
public override void OnApplyTemplate()

Called before the event occurs.

C#
protected override void OnGotFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The data for the event.

Called when IsHighlighted property changed.

C#
protected virtual void OnIsHighlightedChanged()

Called when selection is changed.

C#
protected virtual void OnIsSelectedChanged()

Called before the event occurs.

C#
protected override void OnLostFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The data for the event.

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.

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.

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

C#
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

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

C#
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

Invoked when an unhandled �routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

C#
protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the right mouse button was pressed.

Focus the item.

C#
protected virtual void TryFocus()