You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Install the linked project.
Start the project (deploy on Windows).
Click on the buttons in the CollectionView header (this should work).
Clear all items (use the "Clear items" button).
The EmptyView should now be displayed.
Notice how clicking on the various buttons in the CollectionView header doesn't do anything.
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.
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
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