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

Working with RadWindow as a usercontrol

1 Answer 83 Views
Window
This is a migrated thread and some comments may be shown as answers.
Gary Blakely
Top achievements
Rank 1
Gary Blakely asked on 03 Jun 2010, 09:43 PM
Using the example article at http://www.telerik.com/help/silverlight/radwindow-how-to-use-radwindow-as-user-control.html I was able to create a complex reusable Radwindow named TeeUC.  To display the window and execute the code I ...
TeeUC MyAddTeesWindow = new TeeUC();
myAddTeesWindow.Show();

This code works fine and the code in the UserControl Code-behind begins executing where the InitializeComponent() is located.

However my problem is that if the window is already displayed the above code throws an exception.  So I need to (1) detect if the window is already displayed and (2) somehow turn control over to the code in the window's code-behind without instantiating it.

Is this possible? How can this be done?
Thanks,
Gary

1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 09 Jun 2010, 09:03 AM
Hi Gary,

 You could use the RadWindowManger static class to go trough the opened windows. For turning the control to the code of your window you could expose a method and call it once you find your window in the collection of the RadWindowManager class.

Hope this helps!

Greetings,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Gary Blakely
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or