Hello Darren,
In order to access the "
text1
"
TextBlock element, the
RadTabControl needs to be loaded and initialized. Then you can walk through the visual tree and look for this
TextBlock:
However, on the
DomainDataSource LoadedData() event the
RadTabControl is not yet initialized so that approach cannot be applied.
Another approach is to define a
Loaded() event for the
TextBlock and handle it to define the
TextBlock Text property in code behind:
Still, the data binding approach is much better and when you bind your data in XAML, it is not a good approach to set properties in code as well. So if you can elaborate on your scenario and what exactly you need to display in the
Text property, we might be able to suggest a better approach. For example, you can use an
IValueConverter to convert a binded property.
Greetings,
Tina Stancheva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it.
Learn more>>