Animating RadWindow

11 posts, 0 answers
  1. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 10 May 2010 Link to this post

    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
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 13 May 2010 Link to this post

    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.
  3. DevCraft banner
  4. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 13 May 2010 Link to this post

    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
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 14 May 2010 Link to this post

    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.
  6. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 15 May 2010 Link to this post

    post canceled
  7. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 15 May 2010 Link to this post

    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">

     

  8. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 19 May 2010 Link to this post

    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.
  9. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 19 May 2010 Link to this post

    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
  10. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 May 2010 Link to this post

    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.
  11. Adrian Pay
    Adrian Pay avatar
    28 posts
    Member since:
    Nov 2009

    Posted 01 Jun 2010 Link to this post

    is there an animation for minimizing rad window? if so can u attach example.

    thank you!
  12. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 02 Jun 2010 Link to this post

    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.
Back to Top
DevCraft banner