What event is responsible for pressing the button to expand to full screen?

  • SizeChanged - Mirdin
  • it does not work when maximizing the window - Stope

1 answer 1

We catch SizeChanged and check the WindowState property:

private void Window_SizeChanged(object sender, SizeChangedEventArgs e) { if (this.WindowState == System.Windows.WindowState.Maximized) { MessageBox.Show("Max"); } } 

Just checked on an empty project.