I have this defined to let each cell display it's value in a tooltip:
It works, but for cells that have lots of content, it doesn't wrap the text. So I defined this ToolTipTemplate for the column that has lots of text:
The DataMemberBinding has the same expression as the Text of the Textblock, this just allows the text to wrap. It works well, but...
I'd like to reuse this template for another column, rather than having to define this template again. I'm just not sure what to bind the Text property to so that it works for whatever column I use it with.
<
Style
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"ToolTip"
Value
=
"{Binding Value,RelativeSource={RelativeSource Mode=Self}}"
/>
</
Style
>
It works, but for cells that have lots of content, it doesn't wrap the text. So I defined this ToolTipTemplate for the column that has lots of text:
<
DataTemplate
x:Key
=
"GridViewToolTipTemplate"
>
<
TextBlock
Text
=
"{Binding Description, Converter={StaticResource LineBreaksConverter}}"
TextWrapping
=
"Wrap"
MaxWidth
=
"400"
/>
</
DataTemplate
>
The DataMemberBinding has the same expression as the Text of the Textblock, this just allows the text to wrap. It works well, but...
I'd like to reuse this template for another column, rather than having to define this template again. I'm just not sure what to bind the Text property to so that it works for whatever column I use it with.