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

Mulitiple RAD window controls in the same container

1 Answer 59 Views
Window
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 1
Dario asked on 04 Jun 2009, 12:45 PM
I developed simple UserControl (named "WindowsControl") 
which contains single RadWindow (named "ListScreenWindow") control placed in the Grid (named "WindowPlaceHolder").
Multiple instances of "WindowsControl" should be added to particular ItemsControl dinamically.
The point is showing multiple RadWindow controls AT THE SAME TIME containing some buttons, gridview etc.
Window is shown in the code-behind of user control like this: 
private void UserControl_Loaded(object sender, RoutedEventArgs e) { ListScreenWindow.Show(); }

First dynamically added control is shown correctly (window is shown), but second one throws exception in UserControl_Loaded:

ArgumentException: The value does not fall into the specified range

Maybe following piece of information might be helpfull for you:
I use Prism2 (Composite Application Guidance library) and "WindowControl" is actually a view, and ItemsControl is region.

Could you help us with this?

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 05 Jun 2009, 12:07 PM
Hello Dario ,

RadWindow cannot be placed in ItemsControl or ContentControl. It could be placed in a Panel but I don't recommend that - it is only allowed to let you customize your window in .xaml easily.

Your event doesn't need to put your windows into the visual tree at all, so you can just loop through the items of your collection and create the Windows by yourself and open them. Just note that you need to do this after the application was loaded.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
Tags
Window
Asked by
Dario
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or