Closing and reopening RadWindow

2 posts, 0 answers
  1. Gavin
    Gavin avatar
    8 posts
    Member since:
    Mar 2013

    Posted 05 Mar 2014 Link to this post

    I am trying to implement one of the screen in my project using RadWindow, and I wanted to do it as a singleton within the entire application.  This RadWindow will be shown as modal from time to time.   I know that using wpf windows, doing this will give you an invalidoperationexception:

    win.ShowDialog();
    win.Close();
    win.ShowDialog();


    I see that RadWindow is not derived from Window, so my question is, is it safe for me to do show or reopen the RadWindow even after it has been closed?
  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 10 Mar 2014 Link to this post

    Hello Gavin,

    It is safe to use the same Window multiple times. You will need just to keep its instance in order to be able to reuse it. Please check the attached project which demonstrates a Window which can opened and closed multiple times with buttons.

    Hope this helps. If you have any other questions let us know.

    Regards,
    Kalin
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top