Transition not showing on first container

3 posts, 1 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 03 Nov 2012 Link to this post

    Hi,

    I see a lot of people try to achieve that the animation does not show on first container, but somehow i have that behavior by default and i NEED to show the animation on first container.

    The code is:
    //Set the content of the transition control
          Trans.Content = _cnv;
     
          switch (Transition)
          {
            case TransitionEnum.Fade:
              Trans.Transition = new FadeTransition();
              break;
            case TransitionEnum.FlipWarpAnimation:
              Trans.Transition = new FlipWarpTransition();
              break;
          }

    I don't see what i'm doing wrong, i'm setting the content and then i define the transition, but the content is shown without animation. Then when i change the content again i will get the animation.

    Has this been changed so it would the default behavior... if so, how do i get it to show the animation?

    Best Regards

    Peter

  2. Answer
    Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 08 Nov 2012 Link to this post

    Hi Peter,

    This isn't a built-in feature in the control but it could easily be achieved. One possible solution is to add a timer in the Loaded event of the control and set the item to which the Content of the control is bound to.

    I created and attached a sample project for you showing how to achieve the wanted behavior with the described approach.

    Hope this helps.

    Greetings,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 08 Nov 2012 Link to this post

    Hi Vladi,

    It solves my problem, thanks.

    Feels a bit strange having to resort to a timer for this, but ok, i can live with it.

    Best Regards,

    Peter
Back to Top