0
我可以知道如何更改工具提示中特定單詞的前景嗎?我想把「紅」字改成顏色。請注意,工具提示中的所有其餘單詞應保持黑色。任何可以幫助嗎?工具提示中的前景不同
XAML代碼片段:
<Button Name="myBtn" Content="Click" ToolTip="Click this to change
the text to RED Color" Click="myBtn_Click"/>
我可以知道如何更改工具提示中特定單詞的前景嗎?我想把「紅」字改成顏色。請注意,工具提示中的所有其餘單詞應保持黑色。任何可以幫助嗎?工具提示中的前景不同
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>
真棒!謝謝vadim C = +1 – 0070