This question is locked. New answers and comments are not allowed.
I have a RadCartesianChart in my app and I would like to add a checkbox that would allow me to toggle the PointTemplate on or off for each of the Series in my chart.I tried updating the PointTemplate using the following but the ellipses never appear.
How can I achieve this behavior?
void
checkBoxShowDots_Click(
object
sender, RoutedEventArgs e)
{
foreach
(ScatterLineSeries cs
in
radCartesianChart1.Series)
{
if
((
bool
)checkBoxShowDots.IsChecked)
{
string
Text =
string
.Format(
"<Ellipse Height=\"6\" Width=\"6\" Fill=\"{0}\" />"
, (cs.Stroke
as
SolidColorBrush).Color.ToString()
);
cs.PointTemplate = CreateDataTemplate(Text);
}
else
{
cs.PointTemplate =
null
;
}
cs.InvalidateMeasure();
}
}
How can I achieve this behavior?