Reputation: 2381
I know how to change the tooltip in the xaml side of things, but does anybody know a great solution to do this in C#?
Upvotes: 2
Views: 3352
Reputation: 999
Say you have a button like this:
<Button x:Name="btnOne" Content="How to grow big and strong?">
<Button.ToolTip>
<ToolTip>
Eat your veggies
</ToolTip>
</Button.ToolTip>
</Button>
you can change it like this:
var tip = ToolTipService.GetToolTip(this.btnOne) as ToolTip;
tip.Background = new SolidColorBrush(Colors.Magenta);
Upvotes: 5