Animating Panel through AnimatedPropertySetting Class

3 posts, 1 answers
  1. Awais
    Awais avatar
    2 posts
    Member since:
    Jan 2013

    Posted 18 Feb 2013 Link to this post

      Hey !!
         I am trying to animate rad panel using Animated property class. But only Panel Border is animating. its child controls doesn't animate. I am facing a problem about user-controls not loading smoothly So I want to make it smooth by animating Panel.!! 

       Documentation Link "

       Here is the link from telerik documentation. Checkout its 3rd example in which panel is animating. ! It is not working seriously ! .. Kindly tell me the solution to animate panel using this class or suggest any alternative
  2. Answer
    Plamen avatar
    132 posts

    Posted 21 Feb 2013 Link to this post

    Hello Awais,

    Thank you for bringing our attention to this issue. 

    In Q3 2012 we changed the sizing policy of our controls and this caused the issue with this example. You should use the following code to animate RadPanel bounds:

    RadPanel panel = new RadPanel();
    panel.BackColor = Color.Yellow;
    panel.AutoSize = true;
    panel.RootElement.StretchVertically = true;
    panel.RootElement.StretchHorizontally = true;
    panel.Location = new Point(10, 10);
    panel.Size = new Size(200, 1);
    panel.Text = "I am RadPanel";
    AnimatedPropertySetting setting = new AnimatedPropertySetting();
    setting.Property = RadElement.BoundsProperty;
    setting.StartValue = new Rectangle(0, 0, 200, 1);
    setting.EndValue = new Rectangle(0, 0, 200, 100);
    setting.Interval = 30;
    setting.NumFrames = 10;

    The only change is that you should set StretchHorizontally and StretchVertically properties of RadPanel RootElement property to true. We will correct our documentation.

    All the best,
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. DevCraft R3 2016 release webinar banner
  4. Awais
    Awais avatar
    2 posts
    Member since:
    Jan 2013

    Posted 21 Feb 2013 Link to this post

     Thankyou very Much Plamen !! It Worked :)
Back to Top