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

How to pass data from a page to a user ctrl

3 Answers 58 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Marcelo
Top achievements
Rank 1
Marcelo asked on 13 Oct 2011, 07:12 PM
I have a main page (<Page>) that uses the Transition Ctrl to load user controls (from a menu). I need to be able to pass user data (object containing user name, roles, etc.) from main page to every user ctrl loaded.

Any suggestions would be appreciated.

M.

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 17 Oct 2011, 08:49 AM
Hello Marcelo,

You could provide your data object to your UserControls using their DataContext property just before setting them to the Content property of the RadTransitionControl.

Hope this helps.

Best wishes,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Amine
Top achievements
Rank 1
answered on 15 Feb 2014, 02:20 PM
can you give avery simple exemple project please?
thx
0
Rosen Vladimirov
Telerik team
answered on 19 Feb 2014, 11:40 AM
Hi Amine,

I've created a sample project for you. Please note that this is just one approach to achieve the desired behavior. Another option is to set different DataContext to your UserControls when you set them as content of RadTransitionControl. Everything depends on your application and requirements.

Hope this helps.

Regards,
Rosen Vladimirov
Telerik
Tags
TransitionControl
Asked by
Marcelo
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Amine
Top achievements
Rank 1
Rosen Vladimirov
Telerik team
Share this question
or