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

Represents a control for displaying a legend in data visualizations. The RadLegend allows you to customize the presentation of legend items through properties such as ItemsPanel, ItemTemplate, and DefaultMarkerGeometry. It supports hover effects on items via the HoverMode property and provides a collection of LegendItems to represent data categories. This control is primarily designed to enhance the interactivity and presentation of data visualizations in applications.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
[TelerikToolboxCategory("Data Visualization")]
public class RadLegend : Control

Inheritance: objectRadLegend

Constructors

Initializes a new instance of the RadLegend class.

C#
public RadLegend()

Fields

Identifies the DefaultMarkerGeometry property.

C#
public static readonly DependencyProperty DefaultMarkerGeometryProperty

HoverModeProperty

DependencyProperty

Identifies the HoverMode property.

C#
public static readonly DependencyProperty HoverModeProperty

ItemsPanelProperty

DependencyProperty

Identifies the ItemsPanel property.

C#
public static readonly DependencyProperty ItemsPanelProperty

ItemsProperty

DependencyProperty

Identifies the Items property.

C#
public static readonly DependencyProperty ItemsProperty

ItemTemplateProperty

DependencyProperty

Identifies the ItemTemplate property.

C#
public static readonly DependencyProperty ItemTemplateProperty

Properties

Gets or sets the default Geometry for the markers.

C#
public Geometry DefaultMarkerGeometry { get; set; }

Gets or sets the hover mode.

C#
public LegendHoverMode HoverMode { get; set; }

Gets or sets the LegendItems that will be displayed.

C#
public LegendItemCollection Items { get; set; }

ItemsPanel

ItemsPanelTemplate

Represents the items panel that will be used for the legend presenter to display data.

C#
public ItemsPanelTemplate ItemsPanel { get; set; }

ItemTemplate

DataTemplate

Gets or sets the DataTemplate used to display each legend item.

C#
public DataTemplate ItemTemplate { get; set; }

Methods

Overrides the Measure pass to define a specific behavior for measuring.

C#
protected override Size MeasureOverride(Size constraint)
Parameters:constraintSizeReturns:

Size

Creates a new RadLegendAutomationPeer instance.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer