3 Answers, 1 is accepted
0
Hi Emmanuel,
Regards,
Konstantina
the Telerik team
Thank you for contacting us.
There are several ways for achieving this. You can use the Tag property of the UI elements. Or you could also use a DataContext and bind the controls. Another way of achieving your goal is to expose the controls, to which you are going to assign values, and set them directly.
Hope this information helps.
If you need further assistance please let us know.
Regards,
Konstantina
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Emmanuel
Top achievements
Rank 1
answered on 08 Dec 2010, 04:39 PM
Thank you Constantina,
i am really new to Sileverlight, and your help was really appreciated, and I will read more for my next development, but could you please show me a practical way to apply tag property, in this sample. let's say i have the following usercontrol :
<UserControl x:Class="TVPage.SilverlightControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<TextBox Name="myTxt" Margin="125,107,115,147" />
</Grid>
</UserControl>
How can I add a tag to it, and show this UC in a Radwindow by selecting the content of myTxt from the page declaring my radwindow. thanks again , and looking forward to reading from you.
i am really new to Sileverlight, and your help was really appreciated, and I will read more for my next development, but could you please show me a practical way to apply tag property, in this sample. let's say i have the following usercontrol :
<UserControl x:Class="TVPage.SilverlightControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<TextBox Name="myTxt" Margin="125,107,115,147" />
</Grid>
</UserControl>
How can I add a tag to it, and show this UC in a Radwindow by selecting the content of myTxt from the page declaring my radwindow. thanks again , and looking forward to reading from you.
0
Hi Emmanuel,
Thank you for the details.
Once you have created your UserControl, you can easily set it as a Content of the RadWindow in the MainPage as follows:
Then, you can add the TextBox to the Content of the UserControl and set its Text property:
And finally, show the RadWindow:
Hope this information helps. If you have further questions please let us know.
Regards,
Konstantina
the Telerik team
Thank you for the details.
Once you have created your UserControl, you can easily set it as a Content of the RadWindow in the MainPage as follows:
MyUC uc = new MyUC();
RadWindow myWin = new RadWindow();
myWin.Content = uc;
Then, you can add the TextBox to the Content of the UserControl and set its Text property:
TextBox text = new TextBox();
text.Text = "My Text from the main page";
uc.Content = text;
And finally, show the RadWindow:
myWin.Show();
Hope this information helps. If you have further questions please let us know.
Regards,
Konstantina
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight