This is a migrated thread and some comments may be shown as answers.

ContextMenu ShowDelay not working

2 Answers 91 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
gerardo
Top achievements
Rank 1
Veteran
gerardo asked on 07 Jul 2020, 12:12 PM

How can I apply animation on contextmenu show. I'am trying apply ShowDelay and HideDelay properties but it shows no effect.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 10 Jul 2020, 08:33 AM

Hello Gerardo,

Thank you for your interest in our RadContextMenu.

The RadContextMenu itself is not animated. The appearance of the child of the MenuItems is animated. So setting Show/HideDelay will affect the appearance of the child element panel.

<telerik:RadContextMenu.ContextMenu>
    <telerik:RadContextMenu>
        <!--<telerik:RadMenuItem IsSeparator="True"/>-->
        <telerik:RadMenuItem Header="Sequenz" >
            <telerik:RadMenuItem Header="Sequenz" />
            <telerik:RadMenuItem Header="Inhalt"/>
        </telerik:RadMenuItem>
        <telerik:RadMenuItem Header="Inhalt"/>
    </telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>

The RadContextMenu is placed inside Popup. To animate the appearance of the ContextMenu Popup, you can create an implicit Style targeting the Popup element. In the implicit style, you can set the AllowsTransparency to true and the PopupAnimation property.

<Window.Resources>
    <Style TargetType="Popup">
        <Setter Property="AllowsTransparency" Value="True"/>
        <Setter Property="PopupAnimation" Value="Slide"/>
    </Style>
</Window.Resources>

I hope this approach will work for you.

Regards,
Dinko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
gerardo
Top achievements
Rank 1
Veteran
answered on 12 Jul 2020, 06:13 AM
Thank you for your reply Sir Dinko. That style targeting the Popup element works and will apply on my project. Thanks.
Tags
ContextMenu
Asked by
gerardo
Top achievements
Rank 1
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
gerardo
Top achievements
Rank 1
Veteran
Share this question
or