Here I'm conducting a test to see if I can have several UserControls that contain RADWindow to appear on my MainPage.
test.xaml contains a RADWindow:
test.cs contains window.show() method to show it.
Test2.xaml is also the same with different size.
Now on my MainPage, I placed two buttons to create these two UserControls and adds them to the LayoutRoot: (this is not production code, just a test)
Now when I run the app, I can only have one window show up at a time. If I try to open the second one while the first one is open, i get the following error:
--------------------------
"value does not fall within the expected range"
error details:
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Collection_InsertValue[T](PresentationFrameworkCollection`1 collection, UInt32 index, CValue value)
at MS.Internal.XcpImports.Collection_InsertDependencyObject[T](PresentationFrameworkCollection`1 collection, UInt32 index, DependencyObject value)
at System.Windows.PresentationFrameworkCollection`1.InsertDependencyObject(Int32 index, DependencyObject value)
at System.Windows.Controls.UIElementCollection.InsertInternal(Int32 index, UIElement value)
at System.Windows.PresentationFrameworkCollection`1.Insert(Int32 index, T value)
at Telerik.Windows.Controls.HACKS.AttachPopupToVisualTree(Popup popup)
at Telerik.Windows.Controls.PopupManager.Open(Popup popup, Boolean attachToVisualRoot)
at Telerik.Windows.Controls.PopupManager.OpenWindow(Popup popup, Boolean attachToVisualRoot)
at Telerik.Windows.Controls.PopupManager.Open(Popup popup, PopupType type, Boolean attachToVisualRoot)
at Telerik.Windows.Controls.PopupManager.Open(Popup popup, PopupType type)
at Telerik.Windows.Controls.RadWindowPopup.WindowPopupSilverlightFactory.WindowPopupSilverlightImpl.Show()
at Telerik.Windows.Controls.RadWindowPopup.WindowPopupSilverlightFactory.WindowPopupSilverlightImpl.OpenPopup()
at Telerik.Windows.Controls.RadWindowPopup.WindowPopup.Open(Boolean isModal)
at Telerik.Windows.Controls.RadWindow.ShowWindow(Boolean modal)
at Telerik.Windows.Controls.RadWindow.Show()
at UniqueBrochure.Test2.Test2_Loaded(Object sender, RoutedEventArgs e)
at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
--------------------------
Is there a way to have multiple Window show on MainPage that are in different UserControls rather than all being in one UserControl?
Thanks!
..Ben