Skip to content

Scope.Errors incorrect when set one invalid TextBox invisible #112

@mzh3511

Description

@mzh3511

Can not get correct errors when 1 textbox set to invisible

Hello, I found that Scope.Errors is incorrect when setting one invalid TextBox invisible if there are more than 1 invalid TextBox

  1. Add a button to visible or invisible DoubleTextBox in the Gu.Wpf.ValidationScope.Demo.OneLevelScopeView, the button event method code:
    private void BtnEnable_OnClick(object sender, RoutedEventArgs e)
    {
        if (DoubleTextBox.Visibility == Visibility.Visible)
            DoubleTextBox.Visibility = Visibility.Collapsed;
        else
            DoubleTextBox.Visibility = Visibility.Visible;
    }
  1. Input English letters in both IntTextBox2 and DoubleTextBox
    Expect: Get 2 errors, both IntTextBox2 and DoubleTextBox have the red box
    Actual: Same with expect

  2. Click the button to set the DoubleTextBox Collapsed
    Expect: Get 1 error, IntTextBox2 has the red box, DoubleTextBox disappear
    Actual: Get zero error, IntTextBox2 has the red box, DoubleTextBox disappear

  3. Click the button again to set the DoubleTextBox Visible
    Expect: Get 2 errors, both IntTextBox2 and DoubleTextBox have the red box
    Actual: Get 1 error, both IntTextBox2 and DoubleTextBox have the red box

Can you help me? thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions