Thanks to visit codestin.com
Credit goes to github.com

Skip to content

IndicatorView with Template wont show when ItemSource reaches 0 Elements #25598

@buurned

Description

@buurned

Description

If I use a CarouselView and an IndicatorView with an IndicatorTemplate, the IndicatorView wont show anymore if the ItemSource once receives a ItemSource.Count = 0 and gets filled again.

I have made 2 CarouselView+IndicatorView for illustration, one with and one without IndicatorTemplate.

Image
I also tested it on iOS in my original project - it showed the same behavior there.

I added a link to my test project.

Steps to Reproduce

Steps to reproduce:

  1. create MAUI App
  2. create CarouselView + IndicatorView (incl. IndicatorTemplate)
  3. create a MainViewModel with an ObservableCollection Items and initially fill it with Items.Count > 1.
  4. Add 2 buttons:
  • one for Items.Add()
  • one for Items.RemoveAt(index)
  1. start the app, delete items with the button until .Count = 0, add an item again and notice that the CarouselView is still displayed, but not the indicatorView.

Link to public reproduction project repository

https://github.com/buurned/indicatortemplatebug

Version with bug

9.0.0-rc.2.24503.2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android, iOS

Affected platform versions

Android > 14.0 API 34 and iPhone 15+ with iOS > 17.0

Did you find any workaround?

Removing the datatemplate as shown in the testproject worked

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions