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

Animating RadWindow

10 Answers 136 Views
Window
This is a migrated thread and some comments may be shown as answers.
Gary Blakely
Top achievements
Rank 1
Gary Blakely asked on 10 May 2010, 10:39 PM
I'm referring to a blog entry by Miroslav Nedyalkov on August 11, 2009 entitled "Animating the RadWindow control for Silverlight and WPF. "

It creates a single static class named WindowAnimation that hosts the attached properties that handle the animations and the projet works fine with the one window.  In my application I have many RadWindows and I am wondering if I need a "WindowAnimation" class for each of them.  I added another RadWindow to the demo project and the second window shared the opennnig animation but not the closing animation.  It seems clear to me that I need a static animation class for each RadWindow I want to animate.

My questions are (1) do I understand this correctly and (2) is the the best approach for an application that needs to animate many RadWindows.
Thanks,
Gary

10 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 13 May 2010, 12:40 PM
Hello Gary,

 First of all I would suggest you to use the new approach for animating the Window control - it supports animations out-of-the-box in the current version. There are default animations.

The approach described in the blog post should work just fine with many windows and you shouldn't need to create more than one class for the animations.

All the best,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gary Blakely
Top achievements
Rank 1
answered on 13 May 2010, 04:58 PM
Miroslav,
I have read your Help section on RadWindow and I am not seeing any documentation on out-of-the-box animations.  Could you point me to the docs?  Are you refering to the "RadTransitionControl" ?
Thanks,
Gary
0
Miroslav Nedyalkov
Telerik team
answered on 14 May 2010, 12:35 PM
Hello Gary,

 We still don't have article for this. The RadWindow control is shown/hidden with an animation in the 2010 Q1 version you shouldn't need do anything to enable this.

Greetings,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gary Blakely
Top achievements
Rank 1
answered on 15 May 2010, 11:59 PM
post canceled
0
Gary Blakely
Top achievements
Rank 1
answered on 16 May 2010, 01:04 AM
I'm using q1 2010 SL3 controls and I'm using your WindowsAnimation class and it works well, thank you, with one strange problem...

The first time I do a window.show() it flashes the form quickly (a lot like your default animation), the form vanishes and then it does my animation.  I googled around and saw a post on "how to disable default animation for a treeview" and I tried that but it had no effect.  My xaml right now looks like this...
If I could get by this problem I would be in good shape.
Thanks,
Gary

 

 

<telerik3:RadWindow x:Name="HelpInfo" Header="Information: Country Clubs, Courses, and Tees" RenderTransformOrigin="0.5, 0.5" Margin="200,50,0,0" telerikAnimation:AnimationManager.IsAnimationEnabled="False">

 

 

 

<local:WindowAnimation.OpenAnimation>

 

 

 

 

 

 

<Storyboard Storyboard.TargetName="scaleTransform">

 

 

 

 

 

 

<DoubleAnimation Duration="0:0:0.150" Storyboard.TargetProperty="ScaleX"

 

 

 

 

 

From="0.5" To="1.0" />

 

 

 

 

 

 

<DoubleAnimation Duration="0:0:0.150" Storyboard.TargetProperty="ScaleY"

 

 

 

 

 

From="0.5" To="1.0" />

 

 

 

 

 

 

</Storyboard>

 

 

 

 

 

 

</local:WindowAnimation.OpenAnimation>

 

 

 

 

 

 

<local:WindowAnimation.CloseAnimation>

 

 

 

 

 

 

<Storyboard Storyboard.TargetName="scaleTransform">

 

 

 

 

 

 

<DoubleAnimation Duration="0:0:0.150" Storyboard.TargetProperty="ScaleX"

 

 

 

 

 

From="1.0" To="0.5" />

 

 

 

 

 

 

<DoubleAnimation Duration="0:0:0.150" Storyboard.TargetProperty="ScaleY"

 

 

 

 

 

From="1.0" To="0.5" />

 

 

 

 

 

 

</Storyboard>

 

 

 

 

 

 

</local:WindowAnimation.CloseAnimation>

 

 

 

 

 

 

<telerik3:RadWindow.RenderTransform>

 

 

 

 

 

 

<ScaleTransform x:Name="scaleTransform" />

 

 

 

 

 

 

</telerik3:RadWindow.RenderTransform>

 

 

 

 

 

 

<StackPanel Orientation="Vertical">

 

0
Miroslav Nedyalkov
Telerik team
answered on 19 May 2010, 12:33 PM
Hello Gary,

 If I understand you correctly you want to change the default animation with a custom one, using the approach described in the blog post. What I could suggest you is to describe what kind of animation you want to achieve and I will tell you which animations you might use - there is a bunch of built-in animations, that can be used with most of our controls like fading, scaling, resizing and event shader-based animations like blurring and etc.

If you still prefer the custom solution - could you please send us a sample project that reproduces the problem, because when I stopped the animations using the same approach you do, I didn't observe any animation, so there should be no problems adding a custom animation. 

Greetings,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Gary Blakely
Top achievements
Rank 1
answered on 19 May 2010, 07:28 PM
I have been told of your many built-in animations for radwindow but I have not been able to find documentation anywhere that tells me how to use them.  Could you please point me toward the documentation?

As in your blog post it would be nice to be able to do custom animations but I can't get rid of that first time problem.

Gary
0
Miroslav Nedyalkov
Telerik team
answered on 24 May 2010, 11:21 AM
Hi Gary,

 Unfortunately the documentation about the animations framework we are using is still under construction and I cannot provide you with an article about them. What you need to do is to set the AnimationManager.AnimationSelector attached property of the Window control. Please refer to the following Style that sets the default animations:

<Style TargetType="telerikNavigation:RadWindow">
    <Setter Property="animation:AnimationManager.AnimationSelector">
        <Setter.Value>
            <animation:AnimationSelector>
                <animation:AnimationGroup AnimationName="Show">
                    <animation:FadeAnimation Direction="In" TargetElementName="LayoutRoot" >
                         
                    </animation:FadeAnimation>
                    <animation:ScaleAnimation Direction="In" TargetElementName="LayoutRoot" MinScale="0.9" >
                         
                    </animation:ScaleAnimation>
                </animation:AnimationGroup>
                <animation:AnimationGroup AnimationName="Hide">
                    <animation:FadeAnimation Direction="Out" TargetElementName="LayoutRoot" >
                         
                    </animation:FadeAnimation>
                    <animation:ScaleAnimation Direction="Out" TargetElementName="LayoutRoot" MinScale="0.9">
                         
                    </animation:ScaleAnimation>
                </animation:AnimationGroup>
            </animation:AnimationSelector>
        </Setter.Value>
    </Setter>
</Style>

We have some more types of animations like TransitionAnimation that uses the same Transitions the TransitionControls uses, but we don't have article for them yet.

If you have further questions, don't hesitate to ask.

Sincerely yours,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Adrian Pay
Top achievements
Rank 1
answered on 02 Jun 2010, 04:35 AM
is there an animation for minimizing rad window? if so can u attach example.

thank you!
0
Miroslav Nedyalkov
Telerik team
answered on 02 Jun 2010, 08:16 AM
Hi Adrian,

 There is no such animation. You will need to implement it yourself using similar approach like the one demonstrated in the blog post: http://blogs.telerik.com/miroslavnedyalkov/posts/09-08-05/animating_the_radwindow_control_for_silverlight_and_wpf.aspx. Just you will need to listen for different event.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Gary Blakely
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Gary Blakely
Top achievements
Rank 1
Adrian Pay
Top achievements
Rank 1
Share this question
or