The popup does not disappear even after moving the mouse pointer to another control in wpf

I have help buttons in my window. I need to place an order for a user control pop-up menu above each help button . My custom popup consists of two controls: a tooltip and a link button .

ToolTip : contains tooltips for this button and

LinkButton : redirects it to the help file

Here is my button and popup code

   <telerik:RadButton Grid.Column="2" HorizontalAlignment="Left" Margin="3,65,0,0" Grid.Row="2" VerticalAlignment="Top"
            Width="23" Height="23" BorderThickness="6" BorderBrush="#4E4E4E" Click="RadButton_Click_1" >
            <Image Source="Images/help.png" />
            <telerik:RadButton.Triggers>
                <EventTrigger RoutedEvent="MouseEnter">
                    <BeginStoryboard>
                        <Storyboard TargetName="TooltipPopup" TargetProperty="IsOpen">
                            <BooleanAnimationUsingKeyFrames  FillBehavior="HoldEnd">
                                <DiscreteBooleanKeyFrame KeyTime="00:00:00"  Value="True" />
                            </BooleanAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </telerik:RadButton.Triggers>
        </telerik:RadButton>

and here is the code for the popup

 <Popup PopupAnimation="Fade" Placement="Mouse" AllowsTransparency="True" StaysOpen="False" x:Name="TooltipPopup" >
            <Border   CornerRadius="0" BorderThickness="1">
                <StackPanel Margin="1" Orientation="Horizontal" >
                    <local:UCToolTip></local:UCToolTip>
                </StackPanel>
            </Border>
        </Popup>

When I click on the button, the popup shows up successfully, but does not disappear even after the mouse points to another control.

It only disappears that I click somewhere in the window.

1, , 2, , . , clickbutton

+4
1

.

<telerik:RadButton.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
    <BeginStoryboard Name="MyBeginStoryboard">
        <Storyboard TargetName="TooltipPopup" TargetProperty="IsOpen">
            <BooleanAnimationUsingKeyFrames  FillBehavior="HoldEnd">
                <DiscreteBooleanKeyFrame KeyTime="00:00:00"  Value="True" />
            </BooleanAnimationUsingKeyFrames>
        </Storyboard>
    </BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
    <StopStoryboard BeginStoryboardName="MyBeginStoryboard" />
</EventTrigger>

-1

All Articles