Ok I've now read your question properly -) This.Hide() // Programmatically hides the window Protected override void OnClosing(CancelEventArgs e)Į.Cancel = true // cancels the window close This should allow the window to be hidden/shown even if the user closes the window. Override OnClosing inside the Window and set e.Cancelled to true, then call. If the user has closed it though and a close is unavoidable, you can try the following. If you want the behaviour of hide/show, you should not call Window.Close() on the window at all, but hide it by calling Window.Hide().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |