Working with RadWindow as a usercontrol

2 posts, 0 answers
  1. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 03 Jun 2010 Link to this post

    Using the example article at I was able to create a complex reusable Radwindow named TeeUC.  To display the window and execute the code I ...
    TeeUC MyAddTeesWindow = new TeeUC();

    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?
  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 09 Jun 2010 Link to this post

    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!

    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.
Back to Top