以下のコードでわかるように、HouseholdNoTextBox に 2 つ以上の整数があるかどうかを確認する方法のみを調べています。
private void btnContinue1_Click(object sender, RoutedEventArgs e)
{
if (string.IsNullOrEmpty(HouseholdNoTextBox.Text))
{
textBlockError1.Visibility = Visibility.Visible;
}
if (//HouseholdNoTextBox.Text has > than 2 integers input)
{
textBlockError1.Visibility = Visibility.Collapsed; // collapse the first error box if it is visible
textBlockError2.Visibility = Visibility.Visible; // and make visible the second
}
}