private void txtMin_LostFocus(object sender, RoutedEventArgs e) { txtMin.Text = txtMin.Text.Replace("-", ""); if (txtMin.Text.Equals("")) { txtMin.Text = "MIN"; } else { if (Sanitizer.ValidAmount(txtMin.Text)) { if (!txtMax.Text.Equals("MAX")) { if (Double.Parse(txtMin.Text) > Double.Parse(txtMax.Text)) { validAmountRanges = false; } else { validAmountRanges = true; } } } else { txtMin.Text = "MIN"; } } }