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」という言葉を色に変更したい.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>