Everyone knows how great tooltips are. In fact you wouldn’t even think of not creating a Windows app without them, most likely.
Now, with the wonderful StackPanel, you can have not only text, but images too.
Inside your button XAML, add a tooltip section (Button.ToolTip), add your actual Tooltip section inside that. Then, inside your Tooltip section, add a Stackpanel. Inside that StackPanel, merely add a text block AND an image file. You’d end up with something similar to this:
<Button.ToolTip> <ToolTip Background="Blue" Foreground="White"> <StackPanel> <TextBlock Margin="3" FontSize="14">Text Goes Here</TextBlock> <Image Source="images/yourImage.jpg" /> </StackPanel> </ToolTip> </Button.ToolTip>
Create any mixture of the above you’d like. It’s possible to create some really nice looking tooltips this way
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF
Leave a reply
You must be logged in to post a comment.