I've created a button to enable the user to maximise the window, but I want to be able to restore this back to the normal size when the user clicks it again. What's the easiest way to do this?
My code I've used to maximize the window is:
private void button3_Click(object sender, RoutedEventArgs e)
{
Window MyWindow = System.Windows.Application.Current.MainWindow;
MyWindow.WindowState = WindowState.Maximized;
}