Reputation: 257
I want to use multiple line tool tip in wpf but thie is look like
line 1
line2
but i want to display this miltiple line tool tip in the given format
line 1
line 2
Upvotes: 4
Views: 5856
Reputation: 8792
That worked for me and I don't see anything similar in the answers:
<[ParentControl].ToolTip>
<TextBlock>
Some text here.
<LineBreak/>
And more text in a new line.
</TextBlock>
</[ParentControl].ToolTip>
Upvotes: 3
Reputation: 19710
I personally prefer to embed 

(new line) into the strings I'll be using as tooltips.
ex. Tooltip="line 1 
line 2"
I can then load the strings from resource files and conveniently apply them if I wish without having to go through any additional formatting.
Upvotes: 11
Reputation: 15589
Here is a way to do it with a Label as an example:
<Label>
<Label.ToolTip>
<StackPanel>
<TextBlock>Line 1</TextBlock>
<TextBlock>Line 2</TextBlock>
</StackPanel>
</Label.ToolTip>
</Label>
Upvotes: 6