This is a migrated thread and some comments may be shown as answers.

TransitionControl with StackPanels

2 Answers 66 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 1
Jacob asked on 30 Jan 2013, 06:56 PM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 31 Jan 2013, 01:14 PM
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.

0
Jacob
Top achievements
Rank 1
answered on 31 Jan 2013, 03:04 PM
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!
Tags
TransitionControl
Asked by
Jacob
Top achievements
Rank 1
Answers by
Yana
Telerik team
Jacob
Top achievements
Rank 1
Share this question
or