private bool IsValid() { var valid = true; if (NameTextBox.IsNullOrEmpty()) { NameTextBox.HintText.Foreground = ColorConstants.WarningRed; valid = false; } if (HeightTextBox.IsNullOrEmpty()) { HeightTextBox.HintText.Foreground = ColorConstants.WarningRed; valid = false; } if (WeightTextBox.IsNullOrEmpty()) { WeightTextBox.HintText.Foreground = ColorConstants.WarningRed; valid = false; } if (PositionComboBox.SelectedItem == null || RoleComboBox.SelectedItem == null) { valid = false; } return(valid); }