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
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.
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.
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
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.
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">
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.
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.
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
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.
thank you!
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.