One of my colleagues asked about a column in datagrid / itemlist in listbox which is capable of showing HTML.
Over the above requirement there was yet another requirement where in the tooltip over the html text should show plain text within HTML text. The HTML Text may be truncated based on number of characters allowed followed by ellipses(…).
The result was a usercontrol which is capable of:
- displaying HTML
- displaying ellipses(…) when HTML text is long
- displaying tooltip which displays “stripped” down html (plain text)
- the control itself fully templatized
- Also attached is marquee behaviour which displays rolling text when mouse over on any column.
I also implemented a marquee behaviour so that the text may rollover to display text. here is a snapshot of the output.
and here is the tooltip of the user control
I am including the code here for anyone to use.
Comments / suggestions are welcome.