Class
RadLegend

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:

cs-api-definition
[TelerikToolboxCategory("Data Visualization")]
public class RadLegend : Control

Inheritance: objectRadLegend

Constructors

RadLegend()

Initializes a new instance of the RadLegend class.

Declaration

cs-api-definition
public RadLegend()

Fields

DefaultMarkerGeometryProperty

Identifies the DefaultMarkerGeometry property.

Declaration

cs-api-definition
public static readonly DependencyProperty DefaultMarkerGeometryProperty

Field Value

DependencyProperty

HoverModeProperty

Identifies the HoverMode property.

Declaration

cs-api-definition
public static readonly DependencyProperty HoverModeProperty

Field Value

DependencyProperty

ItemTemplateProperty

Identifies the ItemTemplate property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateProperty

Field Value

DependencyProperty

ItemsPanelProperty

Identifies the ItemsPanel property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsPanelProperty

Field Value

DependencyProperty

ItemsProperty

Identifies the Items property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsProperty

Field Value

DependencyProperty

Properties

DefaultMarkerGeometry

Gets or sets the default Geometry for the markers.

Declaration

cs-api-definition
public Geometry DefaultMarkerGeometry { get; set; }

Property Value

Geometry

HoverMode

Gets or sets the hover mode.

Declaration

cs-api-definition
public LegendHoverMode HoverMode { get; set; }

Property Value

LegendHoverMode

ItemTemplate

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

Declaration

cs-api-definition
public DataTemplate ItemTemplate { get; set; }

Property Value

DataTemplate

Items

Gets or sets the LegendItems that will be displayed.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public LegendItemCollection Items { get; set; }

Property Value

LegendItemCollection

ItemsPanel

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

Declaration

cs-api-definition
public ItemsPanelTemplate ItemsPanel { get; set; }

Property Value

ItemsPanelTemplate

Methods

MeasureOverride(Size)

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

Declaration

cs-api-definition
protected override Size MeasureOverride(Size constraint)

Parameters

constraint

Size

Returns

Size

OnCreateAutomationPeer()

Creates a new RadLegendAutomationPeer instance.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer