Silverlight - ListBox - ToolTip - Microsoft Silverlight

Tooltip represents a control that creates a pop-up window that displays information for an element in the GUI. Silverlight lets you attach a tooltip to any control. In that tooltip, you can add text as well as other element such as panels, ellipse etc.

The hierarchical inheritance of ToolTip class is as follows −

inheritance_tooltip

Given below are the most commonly used properties of ToolTip.

Sr. No. Property & Description
1

IsOpen

Gets or sets a value that indicates whether the ToolTip is visible.

2

IsOpenProperty

Identifies the IsOpen dependency property.

3

Placement

Gets or sets how a ToolTip is positioned in relation to the placement target element.

4

PlacementProperty

Identifies the Placement dependency property.

5

PlacementTarget

Gets or sets the visual element or control that the tool tip should be positioned in relation to when opened by the ToolTipService.

6

PlacementTargetProperty

Identifies the PlacementTarget dependency property.

7

TemplateSettings

Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining templates for a ToolTip.

Given below are the most commonly used events of ToolTip.

Sr. No. Event & Description
1

Closed

Occurs when a ToolTip is closed and is no longer visible.

2

Opened

Occurs when a ToolTip becomes visible.

A simple example is explained, in which a tooltip is added for a button, which contains an ellipse and a TextBlock etc.


When the above code is compiled and executed, you will see the following output by holding mouse courser on button.

tooltip_add_button

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Microsoft Silverlight Topics