You can use the first approach in code either.
var legendSettings =
var triangleSegment =
var figure =
var geometry =
legendSettings.MarkerGeometry = geometry;
series.LegendSettings = legendSettings;
About the second approach, the LegendSettings object doesn't have a template property, so you cannot define a different template for each legend item. You will need to define a single template and assign in to the ItemTemplate of the RadLegend control. In the template you can include additional logic for handling your scenario. For example, you can use an IValueConverter
in the template and based on the Title of the legend item (the series name) hide the element that shows the geometry and display the element with the image. And vice versa - show the geometry and hide the picture.
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.