CustomDrawCrosshairEventArgs.IndicatorLegendElements Property

Returns all indicator elements that the Crosshair Cursor shows in a legend.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll

Declaration

public List<CrosshairIndicatorLegendElement> IndicatorLegendElements { get; }
Public ReadOnly Property IndicatorLegendElements As List(Of CrosshairIndicatorLegendElement)

Property Value

Type Description
List<CrosshairIndicatorLegendElement>

A collection of CrosshairIndicatorLegendElement objects. These objects represent indicator elements that the Crosshair Cursor shows in a legend.

Examples

This example shows how to modify the Crosshair Cursor indicator elements' appearance using the CustomDrawCrosshair event.

In this sample, crosshair content is displayed in a legend. For this, set the ContentShowMode property to Legend. Note that you can specify the crosshair's content show mode for a specified indicator using the CrosshairContentShowMode property.

Use the IndicatorLegendElements property to obtain a collection of indicator elements.

The following properties allow you to modify indicator element appearance:

Property Description
IndicatorPoint Returns information about an indicator point under a crosshair.
CrosshairLegendElementBase.LineElement Returns the crosshair line settings.
CrosshairLegendElementBase.AxisLabelElement Returns the crosshair axis label settings.
<dxc:ChartControl x:Name="chartControl" 
                  CustomDrawCrosshair="chartControl_CustomDrawCrosshair">
    <dxc:ChartControl.CrosshairOptions>
        <dxc:CrosshairOptions ShowOnlyInFocusedPane="False" 
                              ShowValueLine="True"
                              ShowValueLabels="True"
                              ContentShowMode="Legend"/>
    </dxc:ChartControl.CrosshairOptions>
    <!--...-->
</dxc:ChartControl>    
See Also