Hi,
I have a WPF app and I'm trying to mess with WindowState. I have two
windows, a modal selection dialog, and a main window. If I bring up the
selection dialog with the main window in background, and minimize the
selection dialog, it leaves the main window visible but you can't interact
with it. So far, normal.

If I make a selection, the select dialog closes leaving the main window, and
I can minimize the main window using the standard windows controls, and
restore it from the taskbar. OK so far.

However, I want to get it working like this: if I minimize the selection
dialog, I'd like to minimize the main window also. So, I added an event
listener on StateChanged, something like:

def state_changed(...):
    if self._w.WindowState == WindowState.Minimized:
        main_window.WindowState = WindowState.Minimized

This captures the minimize event, both the selection dialog and main window
minimize, BUT now I can't right-or-left-click on the minimized app to get it
to restore, and have to kill the app using task manager. Also, it appears
that instead of having two windows represented on the taskbar, only the main
window is left - even though I should still have both the select dialog and
the main window minimized.

Is there some magic state I need to set in the main window to be able to
have it restore again? Why should it make a difference whether the minimize
is done by the main window 'min' button, or by setting its WindowState?
Ken
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to