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

passing values to user control

1 Answer 68 Views
Window
This is a migrated thread and some comments may be shown as answers.
dCODE
Top achievements
Rank 1
dCODE asked on 15 Mar 2010, 08:51 AM
 

Hai

am having a WPF user control in my telerik Form, when i click my button in my form , i just want to pass some value to the textbox which is in the usercontrol, tell me how to do this.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 18 Mar 2010, 09:31 AM
Hello dCODE,

Can you elaborate more on your scenario? What do you mean with telerik Form?
This textbox that is in the UserControl - is this user control created before button is clicked or after?
What is the main goal here?

If you need just to set TextBox.Text property then you can instantiate the usercontrol set x:Name in the textbox inside the usercontrol and then expose the textbox as a property. Then on button click you could set the textbox text.
If you need to pass complex data if should probably use the MVVM pattern and bind the textbox text property to some property of the data context.

Let us know if you need more information.

All the best,
Hristo
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
dCODE
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or