Skip to content

Content in a CollectionView header is not interactable when an EmptyView is displayed #34432

Description

@Leonardo-pixel

Description

Recently, during our migration to .NET 10 (Maui version 10.0.10), we ran into an issue where it wasn't possible to interact with buttons and other clickable controls inside of a CollectionView header while the EmptyView was displayed.
We only managed to reproduce this on Windows, Android and iOS are working like expected.

This used to work before the migration. We migrated from .NET 8 (Maui version 8.0.80).

To make sure this wasn't because of our implementation, we managed to reproduce the issue in a simple Maui application, a linkt to this project is added below.
The simple application contains a single page with a CollectionView. The header of the CollectionView contains a few buttons to manipulate the items inside the CollectionView and the EmptyView is set using a StaticResource (which is defined inside the CollectionView.Resources).
There is another button below the CollectionView to generate some items (as clicking the buttons that add items in the header of the CollectionView don't work when the EmptyView is displayed).
All buttons are bound to Commands inside the code-behind to keep things simple. The buttons work while there is at least one item in the CollectionView, but once every item is removed (and the EmptyView is displayed) the buttons inside the header stop functioning.

Below is a recording of the issue:

CollectionView.Header.Buttons.Issue.mp4

Steps to Reproduce

  1. Install the linked project.
  2. Start the project (deploy on Windows).
  3. Click on the buttons in the CollectionView header (this should work).
  4. Clear all items (use the "Clear items" button).
  5. The EmptyView should now be displayed.
  6. Notice how clicking on the various buttons in the CollectionView header doesn't do anything.

Link to public reproduction project repository

https://github.com/Leonardo-pixel/CollectionViewTestApp

Version with bug

10.0.10

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

.NET 8 (Please specify exact version)

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

We have not been able to find any workarounds, apart from moving the controls outside of the CollectionView header. However, the way our application is set up this could lead to performance hits and/or rewriting code that affects a big part of the application, so we would like to avoid doing this unless there is no other option.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewi/regressionThis issue described a confirmed regression on a currently supported versionplatform/windowsregressed-in-9.0.21s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions