Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

WPF Tooltip control: Tips & Tricks

$
0
0

1. How to add multi-line tooltip?
For button control, you can wrap the tooltip string in a TextBlock element, and then use either <LineBreak/> or &#x0a in the tooltip string.

image  image

image  image


If you set the tooltip using code, you can directly use “\n” in the tooltip text, :

image 

image

image

2. How to add bolded texts to the tooltip?
Use <Run> element.

image     image 

3. How to add images to the tooltip?
Use <InlineUIContainer> and <Image> elements.

image  image


Filed under: Dotnet/C# Tagged: bold text, example, how to, image, multi line, tooltip, tricks, tutorial, wpf

Viewing all articles
Browse latest Browse all 284

Trending Articles