HTML text in Silverlight controls with ellipses, tooltip and rollover

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:

  1. displaying HTML
  2. displaying ellipses(…) when HTML text is long
  3. displaying tooltip which displays “stripped” down html (plain text)
  4. the control itself fully templatized
  5. 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.

Technorati Tags: ,
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s