wpf-devexpress-dot-xpf-dot-charts-dot-series-3b082b01.md
Gets or sets the template that defines presentation of the legend marker for this series.
Namespace : DevExpress.Xpf.Charts
Assembly : DevExpress.Xpf.Charts.v25.2.dll
NuGet Package : DevExpress.Wpf.Charts
public DataTemplate LegendMarkerTemplate { get; set; }
Public Property LegendMarkerTemplate As DataTemplate
| Type | Description |
|---|---|
| DataTemplate |
The template that configures the legend marker appearance.
|
Specify the Indicator.LegendMarkerTemplate property to configure the indicator marker. Use the ConstantLine.LegendMarkerTemplate and Strip.LegendMarkerTemplate properties to change a constant line and strip’s marker.
LegendMarkerTemplate affects the marker that is displayed for the series in the Crosshair Cursor label.
This example demonstrates how to change appearance of the series marker shown in a legend/Crosshair label.
To specify the marker appearance, assign a DataTemplate object to the Series.LegendMarkerTemplate property:
<dxc:LineSeries2D DisplayName="{Binding CountryName}"
DataSource="{Binding Values}"
ArgumentDataMember="Year"
ValueDataMember="Value">
<dxc:LineSeries2D.LegendMarkerTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Grid Width="12" Height="12">
<Ellipse Stretch="Uniform"
Fill="{Binding Path=MarkerBrush}"
Stroke="{Binding Path=MarkerLineBrush}"
StrokeThickness="2"/>
</Grid>
<TextBlock Text="{Binding Path=Text}"
Margin="4,0,0,0"
VerticalAlignment="Center"
Width="55"/>
</StackPanel>
</DataTemplate>
</dxc:LineSeries2D.LegendMarkerTemplate>
</dxc:LineSeries2D>
See Also