/// <summary> /// Rotates the plane based on user-input /// Displays a messagebox error if input is invalid /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RotateNAnti_ButtonClick(object sender, RoutedEventArgs e) { bool canParse = double.TryParse(RotateN_TextBox.Text, out double x); if (!canParse) { MessageBox.Show("Please enter a number", "Invalid Input", MessageBoxButton.OK, MessageBoxImage.Error); } else { Grid.AnimateRotation(x); } }