4

I have help buttons across my window.My need is to shop a custom popup control on the mouse over of each help buttons .My custom popup consists of two controls a tooltip and a linkbutton.

ToolTip : contains the tips of that button and

LinkButton : redirects it into 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 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 mouse-over a button the popup shows successfully ,But its not disappearing even after the mouse points another control.

Its disappearing only which i click somewhere in the window.

If user mouseover on button1 the popup need to appear and if user mouseover to button 2 then previous popup needs to be closed and the next button popup need to be shown.The popup must needs to be closed when user points to another button or user click linkbutton inside the popup

Dah Sra
  • 4,107
  • 3
  • 30
  • 69
  • There's not really enough information here to know for sure what the problem is. But it seems likely based on what information was provided that this is due to the animation holding the `IsOpen` property to `true`, per the marked duplicate. If you believe otherwise, please improve the question so that it includes a good [mcve] that reliably reproduces the problem. – Peter Duniho Apr 27 '16 at 07:11
  • @PeterDuniho I have mentioned clearly and the question you hvae marked as duplicate is entirely different from mine. I have designed a custom popup and i hvae a link button on that .I need my popup to be open till user click link button or he point to another control.What information you need more..? its clearly described ! – Dah Sra Apr 27 '16 at 07:18
  • _"What information you need more?"_ -- exactly as I already wrote: a good [mcve]. Please also read [ask] for more information on how to present your question in a clear, answerable way. And before you claim (once again) that your question is clear enough, frankly that is _not_ for you to decide. People posting questions always think that their questions are clear enough, and yet we have a plethora of unclear questions on Stack Overflow. – Peter Duniho Apr 27 '16 at 07:23
  • @PeterDuniho if so mark it into some other flags . Don't mark it as a duplicate . Because that answer is not the answer for this question – Dah Sra Apr 27 '16 at 07:29

1 Answers1

-1

You didn't specified closing the pop-up. Try next

<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>

Leonid Malyshev
  • 475
  • 1
  • 6
  • 14