O'Reilly logo

Pro Silverlight 5 in VB by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

<

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required