private void clear3_Click(object sender, RoutedEventArgs e)
 {
     regexOverride = true;
     Application.Current.Dispatcher.Invoke(() => { Waist3Measurement.Clear(); });
     Waist3Measurement.Focus();
     regexOverride = false;
 }
        private void repositionTimer_Tick(object sender, EventArgs e)
        {
            checkBox.IsEnabled = true;
            var timer = sender as DispatcherTimer;

            if (timer == null)
            {
                return;
            }
            if (isThirdMeasurement == false)
            {
                button.IsEnabled            = true;
                waiting.Visibility          = Visibility.Hidden;
                clear1.IsEnabled            = true;
                clear2.IsEnabled            = true;
                Waist2Measurement.IsEnabled = true;
                Waist1Measurement.IsEnabled = true;
                Keyboard.Focus(Waist2Measurement);
            }
            else
            {
                if (manualMeasurement == false)
                {
                    waiting3rdMeasurement.Visibility = Visibility.Hidden;
                    clear1.IsEnabled             = false;
                    clear2.IsEnabled             = false;
                    button.Visibility            = Visibility.Hidden;
                    Waist1Measurement.IsEnabled  = false;
                    Waist2Measurement.IsEnabled  = false;
                    textBlock6.Visibility        = Visibility.Visible;
                    textBlock5.Visibility        = Visibility.Visible;
                    Waist3Measurement.Visibility = Visibility.Visible;
                    button1.Visibility           = Visibility.Visible;
                    button1.IsEnabled            = true;
                    clear3.Visibility            = Visibility.Visible;
                    Waist3Measurement.IsEnabled  = true;
                    isThirdMeasurement           = false;//Must reset so first to measurements can be re-taken
                    button.Visibility            = Visibility.Hidden;
                    textBlock8.Visibility        = Visibility.Visible;
                    textBlock7.Visibility        = Visibility.Visible;
                    Waist3Measurement.Focus();
                }
                else
                {
                    waiting3rdMeasurement.Visibility = Visibility.Hidden;
                    button4.IsEnabled            = true;
                    button3.Visibility           = Visibility.Hidden;
                    textBlock6.Visibility        = Visibility.Visible;
                    textBlock5.Visibility        = Visibility.Visible;
                    textBlock8.Visibility        = Visibility.Visible;
                    Waist3Measurement.Visibility = Visibility.Visible;
                    clear3.Visibility            = Visibility.Visible;
                    button4.Visibility           = Visibility.Visible;
                    textBlock7.Visibility        = Visibility.Visible;
                    Waist3Measurement.IsEnabled  = true;
                    Waist3Measurement.Focus();
                }
            }
            timer.Stop();
            repositionTimer = null;
        }