TemplateBinding and additional string in Silverlight
- by aaginor
Hi folks,
In my Silverlight 3 application, I created a custom Tooltip, that is shown when the mouse is over a part of a Pie-Chart. The displayed values are set via TemplateBinding:
<ToolTipService.ToolTip>
<StackPanel>
<ContentControl Content="{TemplateBinding IndependentValue}" FontWeight="Bold" />
<ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
<ContentControl Content="{TemplateBinding FormattedRatio}"/>
</StackPanel>
</ToolTipService.ToolTip>
The tooltip shows the title of the pie-slice, the value that the size of the slice is based on and the percentage regarding the whole pie:
MyTitel
9
12%
Now, I want to add a constant string to the value, to show the following:
MyTitel
9 items
12%
the string 'items' shall be added to the displayed number. Is there a way to add the constant string to the Content-Property of the ContentControl? (I have no influence on the binded value FormattedDependentValue)
Thanks in advance,
Frank