Quantcast
Channel: Dotnet/C# – Xinyustudio
Viewing all articles
Browse latest Browse all 204

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


Viewing all articles
Browse latest Browse all 204

Trending Articles