Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Multiline ToolTip - Silverlight
WhatsApp
Mahadesh Mahalingappa
13y
15.9
k
0
0
25
Blog
ToolTip uses the ToolTipService.ToolTip attached property for placement, and you can use a string for this value. Multiline tooltip is not possible by default.
Neither Popup nor ToolTip content will inherit font element properties, not even from the XAML page root element. This is because the tooltip objects are displayed above the Silverlight controls when displayed. If you want to style the tooltip or to apply Multiline enabled tooltip, you need to use the TextBlock or any other control as per your requirement.
Static Way - Multiline ToolTip
Appending Hexadecimal Value to represent a Literal
Including a TextBlock inside the ToolTipService tag
In the above example we have seen the static way of applying the MultiLine tooltip. In the hexadecimal way we need to append the characters along with the text as shown in the screen shot. In the second example we need to apply the TextWrapping properties of the TextBlock.
Dynamic Way - Multiline ToolTip
Appending Environment.NewLine
Appending \r and \n
In the above examples we have seen the dynamic way of applying the tooltip. Either you can use the Environment.NewLine or you can use the new line character as shown in the above code.
From the above code snippets, hope you can easily implement the MultiLine tooltip in your Silverlight application.
Multiline ToolTip - Silverlight
Up Next
Using a ContainerBindingCollection in a Telerik RadTreeView in Silverlight
Ebook Download
View all
Printing in C# Made Easy
Read by 22.4k people
Download Now!
Learn
View all
Membership not found