Minimize a window in WPF? Minimize a window in WPF? windows windows

Minimize a window in WPF?


set WindowState = WindowState.Minimized;


You are looking for the Window.WindowState property. It is a dependancy property and when changed will set the Window.RestoreBounds property , so you can always restore to the size before the change.

See the enumeration here.

myWindow.WindowState = WindowState.Minimized;


this.WindowState = WindowState.Minimized;