When i try the lase option using "define the template as string and use the XamlReader.Parse() method":
string
pointTemplateString = @
"<DataTemplate xmlns="
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
" xmlns:x="
"http://schemas.microsoft.com/winfx/2006/xaml"
">"
+
@
"<Ellipse Fill="
"Red"
" Width="
"10"
" Height="
"10"
" /></DateTemplate>"
;
series.PointTemplate = (DataTemplate)XamlReader.Parse(pointTemplateString);
XamlParseException occurred:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: The 'DataTemplate' start tag on line 1 position 2 does not match the end tag of 'DateTemplate'. Line 1, position 183.