Skip to content

Visibility Property Not Updating as Expected in .NET MAUI #28677

@ghost

Description

Description

In .NET MAUI Microsoft.Maui.Controls version 9.0.50, the IsVisible property is not updating dynamically as expected. We have a custom control placed inside a Grid that handles touch and tap events. When the IsVisible property of the custom control changes, it is also applied to its parent, which is the grid. In this case, when we change the IsVisible property from false to true for the custom control, it stays invisible along with the parent grid. Additionally, the PropertyChanged event for IsVisible is not triggered.

This issue was not present in version 9.0.40, where the IsVisible property updated correctly, making the control visible when changed.

CustomSample.zip

Steps to Reproduce

  1. Run the provided sample application.
  2. Click the "Invert Visibility" button to toggle the IsVisible property from false to true.

Expected Behavior:

  • The custom control should become visible when IsVisible is set to true.

Actual Behavior:

  • The custom control remains invisible even after setting IsVisible = true.
  • The PropertyChanged event is not triggered for IsVisible.

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.40 SR4

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-generalGeneral issues that span multiple controls, or common base classes such as View or Elementi/regressionThis issue described a confirmed regression on a currently supported versionlayout-gridp/0Current heighest priority issues that we are targeting for a release.platform/androidplatform/iosplatform/macosmacOS / Mac Catalystplatform/windowsregressed-in-9.0.50s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions