0

My WPF application has a number of "pop-up" dialogs. There's no real need to show them on the task bar. Problem is that by turning off "ShowInTaskBar", they can be minimized to what I think is a somewhat unconventional representation (just above the taskbar), and as such can be inadvertently pushed down in z-order behind the "parent" or other windows, thus seemingly disappearing, but still deactivating the parent while open. There's no real need to minimize them anyway (user might as well just close/cancel), so I think it would make sense to disable minimize functionality for the "pop-up" windows. What would be the most straightforward way to do that (still allow resize/maximize/restore)? As best I recall, this was no big deal in "old-fashioned" Win32/MFC/Winforms - either a checkbox setting to disable the minimize box or a simple tweak of the system menu.

One of the favoured solutions I've seen in a related Q&A was to make the window "NoResize", but I want most of them resizeable. Another answer was to customize the title bar... is that really necessary? Would it be possible/feasible/advisable to access and tweak the system menu in WPF? Any "gotchas" in doing so?

Zenilogix
  • 1,318
  • 1
  • 15
  • 31
  • 1
    Have you tried [this](http://stackoverflow.com/questions/339620/how-do-i-remove-minimize-and-maximize-from-a-resizable-window-in-wpf)? – dowhilefor Jun 22 '13 at 17:24
  • The interop call to SetWindowLong did the trick. Disables the minimize button (which I wanted), but doesn't hide it... a nit-pick, but I can live with it for now. – Zenilogix Jun 22 '13 at 22:25
  • Actually i think to hide it you need to change the windows style, like ToolWindow or similar. Or you need to hide the maximize button aswell not sure about that tho. – dowhilefor Jun 23 '13 at 00:04
  • I didn't want to go ToolWindow, because that really isn't what it is... it's just a plain ol' popup dialog. But I found that part of my problem was that I wasn't setting the window parent, so there was no enforcement of stacking order to keep the pop-up in front of its "logical" parent. So, the interop solution you pointed me at before + setting parents got me the behavior I wanted. – Zenilogix Jul 19 '13 at 15:44

0 Answers0