How to customize tooltip for silverlight control?
- by KentZhou
SL provide ToolTipService.ToolTip for simple tooltip. I want to customize tooltip with my own user control. One way is to do something like:
<TextBlock Text="Hello" >
<ToolTipService.ToolTip>
<TextBlock Text="I can help you." /> <!--replace this with user control -->
</ToolTipService.ToolTip>
</TextBlock>
But what I want is:
1) create a style for tooltip, so that it can be set as something like
<TextBlock Text="Hello" Style="{StaticResource TextBlockWithToolTip}" >
2) Content for tooltip can be set dynamically from datacontext, such as title, content, etc.
How to implement it?