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
Here is how i get it to restore right now: I handle the StateChanged event to keep track of the last state that was not Minimized
WindowState _lastNonMinimizedState = WindowState.Maximized;
private void Window_StateChanged(object sender, EventArgs e)
{
if (this.WindowState != System.Windows.WindowState.Minimized)
{
_lastNonMinimizedState = WindowState;
}
}
To restore i then have to set that WindowState respectively:
this.WindowState = _lastNonMinimizedState;