How to hide (not close) window?

3 posts, 0 answers
  1. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 28 Jan 2013 Link to this post


    based on a bool property in my view model i need to toggle a window (hide/show). i explicitly do not want to close it in order to keep its last location, size, etc. what is the best way to do this? binding the window's Visibility property seems to work for windows. but for dialogs the modal background stays visible (of course). one way would be to detect changes to the window's Visibility property, traverse up the visual tree until the wrapping Popup is found and toggle its IsOpen property accordingly in order to hide/show the windows including its modal background. however, i'm not sure if this popup is always present. and somehow this seems a bit hackish anyway. on another thread someone suggested to set the window's ModalBackground property to null. is this really a better solution? does it work in any case - inbrowser, OOB??? i'm not sure.


    thanks in advance,
  2. Ivo
    Ivo avatar
    390 posts

    Posted 31 Jan 2013 Link to this post

    Hi Stephan,

    I would agree that both solutions feel a bit hackish, but currently these are the only ways to hide modal RadWindows. Both approaches work for in-browser and out-of-browser applications. Setting the ModalBackground to null can be done using just a binding and, therefore, I believe it's easier to be understood by other developers. That's why I would chose it, but in fact this is a matter of personal choice.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft R3 2016 release webinar banner
  4. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 01 Feb 2013 Link to this post

    Alright, thank you for your answer.
Back to Top