ToolTip
Logically, a tooltip is floating content that appears when you hover over an associated element and disappears when you move the pointer away. The ToolTip control doesn’t perform any of this magic, however. It’s a simple content control that places its content in a white box with a gray border (in the dark theme). The magic is done by a ToolTipService class and its three attached properties. The main one is ToolTipService.ToolTip, which enables a ToolTip to be attached to any UIElement and automatically appear/disappear when appropriate. Figure 9.5 shows a typical ToolTip in action, created from the following XAML:
<Button> + <ToolTipService.ToolTip> <ToolTip> Add New Item </ToolTip> </ToolTipService.ToolTip> </Button ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access