Set MainWindow.ResizeMode to CanMinimize