A little something I found useful. I'm making a line chart, and I need multi-line labels above the points, but there's no clean way to add a newline character to the LabelFormatString, other than creating a property on the data object with one...
So, my alternative... A little tweak to your StringHelper. Right after the match delegate checks for digits:
if (property.Length > 0 && property[0] == '\\')
return Regex.Unescape(property);
And now my XAML looks like this:
LabelFormatString="{}{Name}{\n}{1:0.00%}"
Comments: Good idea, but I think this should be escaped in XAML - use " " Then we don't need to add more custom syntax to the format strings.
So, my alternative... A little tweak to your StringHelper. Right after the match delegate checks for digits:
if (property.Length > 0 && property[0] == '\\')
return Regex.Unescape(property);
And now my XAML looks like this:
LabelFormatString="{}{Name}{\n}{1:0.00%}"
Comments: Good idea, but I think this should be escaped in XAML - use " " Then we don't need to add more custom syntax to the format strings.