This is a migrated thread and some comments may be shown as answers.
RadContextMenu animation
1 Answer 28 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
IsolatedStorage asked on 15 Dec 2010, 03:18 AM
Is it possible to animate the way a RadContextMenu opens and closes? I have tried using the VisualStateManager (below) but it doesn't produce the results I was hoping for.

<telerik:RadContextMenu x:Name="GridContextMenu">
    <VisualStateGroup x:Name="CommonStates">
        <VisualTransition From="Closed" To="Opened" GeneratedDuration="00:00:00.5">
                <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="GridContextMenu" Storyboard.TargetProperty="Opacity">
                    <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/>

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 17 Dec 2010, 01:02 PM

Thank you for contacting us.

To achieve your goal you have to keep in mind the following things:
1. The VisualStateManager has to be used in a ControlTemplate or a UserControl, cannot be set like this in to the control.
2. The easiest way to manipulate animation is using Expression Blend.
3. The ContextMenu already has an animation for the Opacity.
If you want to open the menu with VisualStateManager, the VisualStateManager has to be to the UserControl and animate the IsOpen property of the Menu, not the Opacity. Instead of DoubleAnimationUsingKeyFrames you can use the ObjectAnimationUsingFeyFrames. Then, change the TargetProperty to IsOpen. Change the
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>


<DiscreteObjectKeyFrame KeyTime="0" Value="1"/> 

Hope this information helps. If you have further questions please let us know.

the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question