1

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.

  • 3
    Possible duplicate of [How to show tooltip in code behind in WPF](https://stackoverflow.com/questions/23041768/how-to-show-tooltip-in-code-behind-in-wpf) – Fruchtzwerg Oct 31 '17 at 18:06
  • Could you reformat the tile in the form of a question? – Joe Oct 31 '17 at 19:40

1 Answers1

1

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>
mm8
  • 163,881
  • 10
  • 57
  • 88