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

RadWIndow Silverlight

5 Answers 630 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 29 Jul 2008, 05:29 PM
I would like to use the RadWindow for an about box.  I cannot find documentation on how to populate the window with controls or text.  Is there an documentation or samples for RadWindow ?

Bob

5 Answers, 1 is accepted

Sort by
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:
    <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
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
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:
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
Tags
Window
Asked by
Bob
Top achievements
Rank 1
Answers by
Valio
Top achievements
Rank 1
Bob
Top achievements
Rank 1
Share this question
or