格式化工具提示 [英] Formatting ToolTips
本文介绍了格式化工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在XAML代码中是否可以为工具提示添加一些基本格式? 例如< p>< / p>或者< strong>< / strong>?
In the XAML code is it possible to add some basic formatting to the ToolTips? For example <p></p> or <strong></strong>?
推荐答案
您可以将几乎所有内容放入工具提示中,这是一个使用TextBlock的示例粗体文字。
You can put almost anything into a tooltip, here is an example that uses a TextBlock with some bold text.
<Button Content="Button" Margin="251,210,257,188" >
<ToolTipService.ToolTip>
<TextBlock><Run Text="Non bold text, this is "/><Run FontWeight="Bold" Text="bold."/></TextBlock>
</ToolTipService.ToolTip>
</Button>
这篇关于格式化工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文