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

Animating a RadWindow

1 Answer 45 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 26 Mar 2012, 02:49 PM
Whats the best way to animate a rad window and can you provide an example? Ive seen lots of posts dated 2009 talking about this topic but I was wondering if there are any  updates. Also, my RadWindow is instantiated in the code behind of its parent page as well and I would like to animate it (differently from the default fade in) when opened.

public partial class ParentPage {
    ApplyGradeWindow agw = new ApplyGradeWindow();
 
    protected void ShowWindow(GradeDocumentArgs gradeArgs)
    {
        agw.CurrentGradeDocumentArgs = gradeArgs;
        agw.ShowDialog();
    }
}

1 Answer, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 27 Mar 2012, 09:42 AM
Hello Tony,

You can achieve this by setting a creating a style into the App.xaml for the RadWindow. The property you will have to set is telerik:AnimationManager.AnimationSelector. Here is the default style, you can modify it to suit your needs.
<Style TargetType="telerik:RadWindow" >
            <Setter Property="telerik:AnimationManager.AnimationSelector">
                <Setter.Value>
                    <telerik:AnimationSelector>
                        <telerik:AnimationGroup AnimationName="Show">
 
                            <telerik:FadeAnimation Direction="Out" TargetElementName="LayoutRoot">
 
                                <telerik:FadeAnimation.Easing>
                                    <QuarticEase EasingMode="EaseOut" />
                                </telerik:FadeAnimation.Easing>
 
                            </telerik:FadeAnimation>
                            <telerik:ScaleAnimation Direction="Out" TargetElementName="LayoutRoot" MinScale="0.9">
 
                                <telerik:ScaleAnimation.Easing>
                                    <QuarticEase EasingMode="EaseIn" />
                                </telerik:ScaleAnimation.Easing>
 
                            </telerik:ScaleAnimation>
 
                            <telerik:FadeAnimation Direction="In" TargetElementName="LayoutRoot">
                                <telerik:FadeAnimation.Easing>
                                    <QuarticEase EasingMode="EaseOut" />
                                </telerik:FadeAnimation.Easing>
                            </telerik:FadeAnimation>
                            <telerik:ScaleAnimation Direction="In" TargetElementName="LayoutRoot" MinScale="0.9">
 
                                <telerik:ScaleAnimation.Easing>
                                    <QuarticEase EasingMode="EaseOut" />
                                </telerik:ScaleAnimation.Easing>
 
                            </telerik:ScaleAnimation>
                        </telerik:AnimationGroup>
                        <telerik:AnimationGroup AnimationName="Hide">
 
                        </telerik:AnimationGroup>
                    </telerik:AnimationSelector>
                </Setter.Value>
            </Setter>
        </Style>


Greetings, Ivo
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Window
Asked by
Tony
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Share this question
or