5 Answers, 1 is accepted
0
Valio
Top achievements
Rank 1
answered on 29 Jul 2008, 05:59 PM
Hi Bob,
You can see how to use RadWindow from our online examples site:
http://www.telerik.com/demos/silverlight/#Examples/Window/FirstLook
Basically - everything you place between the <RadWindow opening and closing tags will be displayed in the window:
Let us know if you have any other questions.
Best Regards,
Valentin Stoychev
Telerik
You can see how to use RadWindow from our online examples site:
http://www.telerik.com/demos/silverlight/#Examples/Window/FirstLook
Basically - everything you place between the <RadWindow opening and closing tags will be displayed in the window:
<telerik:RadWindow x:Name="window" Header="RadWindow" WindowStartupLocation="CenterParent" TopOffset="-50" WindowAnimation="OnShow"> |
<Image Source="../../Common/Images/RadWindow/Window.png"/> |
</telerik:RadWindow> |
Let us know if you have any other questions.
Best Regards,
Valentin Stoychev
Telerik
0
Bob
Top achievements
Rank 1
answered on 29 Jul 2008, 06:02 PM
Thank you for the quick reply. I need to be able to add items programatically from the code behind. I tried adding a stack panel to the comments as well as a contentcontrol that had the stack panel added to it. I both cases I had a number of abends. How does one access the children of the Window via the code behind ?
Bob
Bob
0
Bob
Top achievements
Rank 1
answered on 29 Jul 2008, 06:53 PM
I think I can see how to do this. I created the window in the xaml and added a child element of type StackPanel. In the code behind I can now add items to the stack panel. I just don't seem to be able to completely build the control in the code behind which would be the preference.
Bob
Bob
0
Accepted
Valio
Top achievements
Rank 1
answered on 29 Jul 2008, 06:58 PM
Hi Bob,
you need to set the Content property of RadWindow. This is a sample code:
Basically the RadWindow is a HeaderedContentControl, which means that you can set any content you like to its Content property (including StackPanel). More info on HeaderedContentControls is available here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.headeredcontentcontrol.aspx
Best,
Valentin Stoychev
Telerik
you need to set the Content property of RadWindow. This is a sample code:
RadWindow window = new RadWindow(); |
Image img = new Image(); |
img.Source = new BitmapImage(new Uri(@"Window.png", UriKind.RelativeOrAbsolute)); |
window.Content = img; |
Basically the RadWindow is a HeaderedContentControl, which means that you can set any content you like to its Content property (including StackPanel). More info on HeaderedContentControls is available here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.headeredcontentcontrol.aspx
Best,
Valentin Stoychev
Telerik
0
Valio
Top achievements
Rank 1
answered on 29 Jul 2008, 07:01 PM
Bob,
you can find more info on how to create dynamicaly the RadWindow in this example:
http://www.telerik.com/demos/silverlight/#Examples/Window/Configurator
Check-out the c# code of the sample.
Let us know if we can help you further.
Best,
Valentin Stoychev
Telerik
you can find more info on how to create dynamicaly the RadWindow in this example:
http://www.telerik.com/demos/silverlight/#Examples/Window/Configurator
Check-out the c# code of the sample.
Let us know if we can help you further.
Best,
Valentin Stoychev
Telerik