Is there any way to prevent minimizing of owned window? I have an app that uses new windows for messaging and I'm using OwnedWindows list to manage them. Closing Owned windows when main app is closed is also good for me. I just need to be able to minimize the Owner without minimizing the Owned windows.
Asked
Active
Viewed 950 times
1
-
1Can't you just set the ResizeMode to NoResize? Code to disable the minimize button [is here](http://stackoverflow.com/a/958980/17034), use WS_MINIMIZEBOX instead (0x20000). – Hans Passant Jan 18 '14 at 22:37
1 Answers
0
You can avoid using owned windows, in which case you won't have that problem.
If you do that though, closing the main window won't be enough to close your application anymore, so you will need to modify your App.xaml
and set ShutdownMode
to OnMainWindowClose
like so:
<Application ShutdownMode="OnMainWindowClose" ...>
</Application>
If you don't do that, the application will stay open as long as there's a window open, even if the main window has already been closed.

Adi Lester
- 24,731
- 12
- 95
- 110
-
Well the thing is that I'm using IronPython and I'm using Owner/Owned windows to access controls/functions that belongs to another window. More specifically the Main Window is a sender/receiver and other works only as places to display and enter messages. I don't want to disable minimize button , just the signal from Owner – Grzegorz Łach Jan 19 '14 at 11:20
-
-
I know but it also wont let me call owners method like this : self.Owner.sendMessage() – Grzegorz Łach Jan 19 '14 at 12:38
-
If that's the case, you can just declare a new property in your window and keep the owner there. – Adi Lester Jan 19 '14 at 12:43