Skip to content

Setting Label.Visible to false does not hide the Label #1984

@heinrich-ulbricht

Description

@heinrich-ulbricht

Describe the bug
In ReactiveExample, binding Label.Visible to a boolean does not hide the label when the boolean turns false.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. In Visual Studio, open Terminal.sln, set ReactiveExample as Startup project
  3. In ReactiveExample -> LoginView.cs make the following change (replace setting ColorScheme with setting Visible):

image

  1. Run and fill the input fields, then clear the input fields

Expected behavior
I expect the label to disappear when both input fields contain values This does not happen, it just stays, showing the same old text.

(My goal is to hide the validation label when the input fields are filled.)

Screenshots

Modified app (as in above screenshot)
Starting the app all is well, the label is showing ("Please, enter..."):

image

After entering text the label should disappear, but instead still shows the "old" text ("Please, enter..."):

image

UNmodified app (as freshly pulled)
Just to check that the bindings etc. are all set up I reverted back to the unmodified version. Here is the app when starting, showing the validation text (here in red since the code for changing the ColorScheme is active):

image

The validation text changes properly when having filled both input fields ("The input is valid"):

image

And it changes back when clearing the input fields:

image

Am I wrong in my expectation that hiding the label should be possible as well? If yes, how else would I do it?

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 1.7.2
  • .NET 6 console app

Additional context

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