TransitionControl with StackPanels

3 posts, 0 answers
  1. Jacob
    Jacob avatar
    4 posts
    Member since:
    Aug 2012

    Posted 30 Jan 2013 Link to this post

    New to Telerik Silverlight controls and not sure if I am not looking in the right place or not. I have searched around and cannot seem to find a solution for using a transition control with stackpanels. Maybe it would be better to outline the issue: I have three stackpanels with different things like a detail section / stackpanel with textblocks, a history section / stackpanel with a RadGridView, etc. The idea is to have one visible until a button or something is clicked and it will hide the one there and show the next one. Am I on the right track or need to refocus?

    Thanks,
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 31 Jan 2013 Link to this post

    Hi Jacob,

    Thank you for contacting us.

    I have prepared a sample project which demonstrates how you could show and hide StackPanels with transition. Note that RadTransitionControl is a ContentControl which plays the animation when its Content is changed - that's why I use binding to update its Content and a Converter to switch the Visibility of the StackPanels.

    I would also suggest to check how RadTransitionControl can be used with Navigation Framework in this online example  - generally this approach is better, but is suitable only in cases when the controls in the different StackPanels are independent.

    Hope this helps. If you have any additional questions, please let us know.

    Greetings,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Jacob
    Jacob avatar
    4 posts
    Member since:
    Aug 2012

    Posted 31 Jan 2013 Link to this post

    Worked like a champ but I am stuck on one more thing: The viewmodel. I am binding it in the code behind so cannot delcare it as a staticrsource for the content source..... any way around that?

    FOLLOW UP
    We figured it out....we just had a grid inside the stackpanels and re-bound the data context on those.

    Thanks!
Back to Top