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 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
  2. Miroslav Nedyalkov
    Admin
    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!

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