Reputation: 84
Is it possible to display a ToolTip of an element if mouse/keyboard hasnt actually moved over that element? I know, that Popup would sound proper solution for that, but for my form I want to have ToolTips displayed over elements, few per time.
Upvotes: 1
Views: 1201
Reputation: 169150
Is it possible to display a
ToolTip
of an element if mouse/keyboard hasnt actually moved over that element?
Yes, the ToolTip
has an IsOpen
property that you can set:
<TextBlock x:Name="tb" Text="..." xmlns:s="clr-namespace:System;assembly=mscorlib">
<TextBlock.ToolTip>
<ToolTip IsOpen="True" Placement="Bottom" PlacementTarget="{Binding ElementName=tb}"
HorizontalOffset="100" VerticalOffset="100">
<TextBlock>Tooltip...</TextBlock>
</ToolTip>
</TextBlock.ToolTip>
</TextBlock>
Upvotes: 1