Reputation: 21
I've created a simple UserControl in ExpressionBlend. The UserControl is a ractangle with a TextBlock in it. When i use this UserContol in a Silverlight project, i can not change the text in the textBlock of the control. Should give an acces to the TextBlock before using the Control?
HELP"_
Upvotes: 0
Views: 228
Reputation: 14589
Your user control should have public properties that map to its features. If you want the users of the control to be able to set the text, create a Text property. The implementation can be as simple as forwarding to the inner TextBox. Exposing the inner control is not the right way to do it.
Upvotes: 1