Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以知道如何更改工具提示中特定单词的前景吗?我想把“RED”字改成colors.Red;请注意,工具提示中所有剩余的单词应保持黑色。有什么可以帮忙的吗?
XAML 代码片段:
<Button Name="myBtn" Content="Click" ToolTip="Click this to change the text to RED Color" Click="myBtn_Click"/>
很容易实现:
<Button Name="myBtn" Content="Click" Click="myBtn_Click"> <Button.ToolTip> <TextBlock> <Run>Click this to change the text to </Run> <Run Foreground="Red">RED</Run> <Run> Color</Run> </TextBlock></Button.ToolTip> Test </Button>