Skip to content

[Windows] EmptyViewTemplate not displayed when ItemsSource is set to Null #28334

@NafeelaNazhir

Description

@NafeelaNazhir

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

  1. Launch the application on Windows CollectionViewSample.zip
  2. Tap the EmptyView/EmptyViewTemplate button to navigate to the CollectionView Control Page.
  3. Tap the Options toolbar item to navigate to the Options Page, then select ItemsSource and EmptyViewTemplate.
  4. 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

Relevant log output

Metadata

Metadata

Assignees

Labels

area-controls-collectionviewCollectionView, CarouselView, IndicatorViewpartner/syncfusionIssues / PR's with Syncfusion collaborations/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions