I'm trying to format the String output for my Series Trackball so that it only shows 2 decimal places. The code I have at the moment for my Template is as follows:
<
telerik:RadCartesianChart.Resources
>
<
sys:String
x:Key
=
"CategoryFormat"
>Date: {0}</
sys:String
>
<
sys:String
x:Key
=
"ValueFormat"
>Value: {0:n2}</
sys:String
>
<
DataTemplate
x:Key
=
"seriesTrackBallInfoTemplate"
>
<
StackPanel
Orientation
=
"Vertical"
>
<
TextBlock
Text
=
"{Binding Path=MeasurementData.Category, StringFormat={StaticResource CategoryFormat}}"
/>
<
TextBlock
Text
=
"{Binding Path=MeasurementData.Value, StringFormat={StaticResource ValueFormat}}"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadCartesianChart.Resources
>
The type of MeasurementData.Value is Double.
I've tried various approaches and nothing seems to work.
Any suggestions?