Click or drag to resize
DigitalRuneToolTipManager Class
Manages tool tips.
Inheritance Hierarchy
SystemObject
  DigitalRune.Game.UIToolTipManager

Namespace: DigitalRune.Game.UI
Assembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.8.0.0 (1.8.0.14553)
Syntax
public class ToolTipManager

The ToolTipManager type exposes the following members.

Methods
  NameDescription
Public methodCloseToolTip
Hides the tool tip or does nothing if no tool tip is visible.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodShowToolTip
Shows a tool tip.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCreateToolTipContent
Gets or sets a callback that creates a UIControl for a ToolTip.
Public propertyIsToolTipOpen
Gets a value indicating whether a tool tip is currently shown.
Public propertyScreen
Gets or sets the screen.
Public propertyToolTipControl
Gets the ContentControl that shows the tool tip.
Public propertyToolTipDelay
Gets the time which the mouse has to stand still before a tool tip pops up.
Public propertyToolTipOffset
Gets the offset of the tool tip to the mouse position.
Top
Remarks

Each UIScreen has a ToolTipManager. (Currently it is not possible to use a custom ToolTipManager.)

Tool tips can be defined per control using the property ToolTip. The tool tip can be a UIControl, a String, or an Object:

  • UIControl: If the tool tip is a control, then the control is shown as the content of the ToolTipControl.
  • String: If the tool tip is a String, then the string will be wrapped in a TextBlock and shown in the ToolTipControl.
  • Object: If the tool tip is an Object, then the string representation of the object will be shown as the tool tip. (The string will be wrapped in a TextBlock and shown in the ToolTipControl.

The user can override this behavior by setting the CreateToolTipContent callback. The callback receives the value stored in ToolTip and returns the UIControl that will be shown in the ToolTipControl.

Control Styles: Per default, the ToolTipControl uses the style "ToolTip" and the TextBlock that wraps the tool tip content uses the style "ToolTipText". (See Style for more information about styles.)

See Also