-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] EmptyViewTemplate not displayed when ItemsSource is set to Null #28334
Description
Description
In a .NET MAUI application, when using a CollectionView with an ItemsSource initially set to a list, the EmptyViewTemplate is not displayed when the ItemsSource is subsequently set to Null. Additionally, if the ItemsSource is initially set to null, the EmptyViewTemplate is also not displayed.
Note: For EmptyView
-
When EmptyView is selected first and then ItemsSource is selected, the EmptyView is not displayed.
-
When ItemsSource is selected first and then EmptyView is selected, the EmptyView is displayed correctly.
Screen.Recording.2025-03-12.110135.mp4
Steps to Reproduce
- Launch the application on Windows CollectionViewSample.zip
- Tap the EmptyView/EmptyViewTemplate button to navigate to the CollectionView Control Page.
- Tap the Options toolbar item to navigate to the Options Page, then select ItemsSource and EmptyViewTemplate.
- Observe that the EmptyViewTemplate is not displayed.
Expected Behavior: The EmptyViewTemplate should be displayed when the ItemsSource is set to None, regardless of the initial state of the ItemsSource.
Actual Behavior: The EmptyViewTemplate is not displayed when the ItemsSource is initially set to a list and then changed to None.
Link to public reproduction project repository
No response
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
No response
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response