This is somewhat of a mundane question but it seems to me there is no in-built method for it in WPF. There only seems to be the WindowState
property which being an enum does not help since i cannot tell whether the Window was in the Normal
or Maximized
state before being minimized.
When clicking the taskbar icon the window is being restored just as expected, assuming its prior state, but i cannot seem to find any defined method which does that.
So i have been wondering if i am just missing something or if i need to use some custom interaction logic.
(I'll post my current solution as answer)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…