Silverlight爲基本應用提供了ToolTipService.ToolTip
。如何自定義ToolTipService.ToolTip的模板?
不過,我想通過做這樣的事情來定製ToolTip
的Template
:
<TextBlock Text="Hello" >
<ToolTipService.ToolTip>
<TextBlock Text="I can help you." /> <!--replace this with my template-->
</ToolTipService.ToolTip>
</TextBlock>
我想ToolTip
的Content
或Style
財產能夠被從DataContext
動態設置。
有得這種效果:
<TextBlock Text="Hello" Style="{StaticResource TextBlockWithToolTip}" />
我知道這是一個遲到的評論,但是您是否可以更新您的答案以顯示如何使用此CodePlex工具提示來解決OP的問題? – 2014-02-13 17:16:41