Tooltips and Pop-Ups

Silverlight has a flexible model for tooltips (those infamous yellow boxes that pop up when you hover over something interesting). Because tooltips in Silverlight are content controls, you can place virtually anything inside a tooltip.

Tooltips are represented by the ToolTip content control. However, you don't add the ToolTip element to your markup directly. Instead, you use the ToolTipService to configure a tooltip for an existing element, by setting attached properties. Silverlight will then create the ToolTip automatically and display it when it's needed.

The simplest example is a text-only tooltip. You can create a text-only tooltip by setting the ToolTipService.ToolTip property on another element, as shown here:

<

Get Pro Silverlight 5 in VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.