Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Feature request: LoopItemsPanel #1471

Closed

Description

@Vijay-Nirmal

This control helps dev to easy achieve looping Items in ItemsControl.

<ListView>
    <ListView.ItemsPanel>
        <ItemsPanelTemplate>
            <controls:LoopItemsPanel/>
        </ItemsPanelTemplate>
    </ListView.ItemsPanel>
</ListView>

There is a Microsoft blog post to create this Panel.

0207 image_75d6141a

I found a similar UserVoice

Activity

  1. mdtauk commented on Sep 3, 2017

    @mdtauk

    Is this not a Carousel that loops? Why not add a loop option to that control?

  2. Vijay-Nirmal commented on Sep 3, 2017

    @Vijay-Nirmal
    ContributorAuthor

    @mdtauk Because looping Carousel will not cover all use cases of looping items. Ex: Carousel always has selected item at centre. In short, Carousel will not cover all the use case of ListViewBase(ListView, GridView, etc). Also, this panel can be easily reused in future controls like TrainView #1209, where it makes lot of sence to have looping items.

  3. mdtauk commented on Sep 3, 2017

    @mdtauk

    Hmm. From a design point of view, how do you indicate when a loop starts. A scrollbar indicator goes from one point to another. How does that work when there is no finite range? How does it work with mouse and keyboard control?

    There is a lot to consider, and then finding use-cases that justify this kind of control needs to be collated. To see if it is worth the investment of time that would go into it, and to iron out the problems and issues related to it.

  4. Vijay-Nirmal commented on Sep 3, 2017

    @Vijay-Nirmal
    ContributorAuthor

    @mdtauk I get this idea from Microsoft blog post. They have explained it with a sample code.

  5. michael-hawker commented on Sep 6, 2017

    @michael-hawker
    Member

    I like the idea of generalizing this. I think the sticking point as @mdtauk mentioned is how the scrollbar behaves with each control.

  6. birbilis commented on Sep 7, 2017

    @birbilis

    I would really like to be able to loop to the start of a long scrolling list (say on the phone) when I reach the bottom. Possibly with a customizable (and optional) visual end marker (horizontal, or vertical if list is horizontral, ruler) so that the looping occurrence is more obvious to the user. And I mean to add "Looping" bool property (defaulting probably to false if xaml-standard opts for compatibility over UX) to any List control that can scroll when it can't fit all its items in the view

  7. birbilis commented on Sep 8, 2017

    @birbilis

    ...and loop in the other way too, when I pull enough to overcome spring animation at the start of the list view, I'd like it to loop. Useful for lists that are sorted and long and you know you want to start browsing from the bottom without doing a resorting (or when multiple resorting UIs are too much to add - eg at data entry form fields)

  8. Mimetis commented on Sep 27, 2017

    @Mimetis
    Contributor

    I'm actually the author of the LoopItemsPanel, and the Carousel control.

    I think (in my opinion) the question is :

    1. Do we have to implement the loop mode in the Carousel (see Loop for Carousel #1462 )
    2. Do we have to create instead an ItemsPanelTemplate to be able to customize any ItemsControl control
    3. Both ?
  9. Vijay-Nirmal commented on Sep 27, 2017

    @Vijay-Nirmal
    ContributorAuthor

    @Mimetis In my opinion "create an ItemsPanelTemplate to be able to customize any ItemsControl control" will have higher priority than "implement the loop mode in the Carousel". Devs can create looping Carousel with LoopItemsPanel but not vice versa. "Both" is good for devs.

  10. Mimetis commented on Sep 27, 2017

    @Mimetis
    Contributor

    The ItemsPanel Inside the Carousel is highly coupled with the control itself.
    Actually, it's not possible to replace the Carousel's ItemsPanel with another one.
    I already thought to change this behavior to have a carousel control without any dependencies with its items panel, but it's really complicated.
    So for now, if you want a LoopItemsPanel to be able to use it in a Listbox or a ListView, you won't have it for the Carousel

  11. nmetulev commented on Sep 27, 2017

    @nmetulev
    Contributor

    @Mimetis, what about creating a LoopItemsPanel and extending the CarouselPanel from the LooptemsPanel to get the looping experience?

  12. birbilis commented on Sep 28, 2017

    @birbilis
  13. Mimetis commented on Sep 28, 2017

    @Mimetis
    Contributor

    @birbilis : As explained in the blog post, it' all about positioning items during the UpdatePosition method.
    Nothing really complicated, actually.
    Using the RenderTransform to virtually be able to position the item at the right place :)

    @nmetulev : Yea, you're so right :) Definitively the right solution, I guess. Actually it won't be easy, but it's will be a really cool feature if we can do that.
    But it will be a big breaking changes from the actual Carousel
    First of all, do you think that creating the LoopItemsTemplate for any ListBox / ListView is a good starting point ?
    To be honest I'm afraid that everyone will complained that the LoopItemsTemplate will not be compatible with the Carousel

  14. 9 remaining items

  15. lucaasrojas commented on Jun 29, 2018

    @lucaasrojas
    Contributor

    Whats the current status?

  16. touseefbsb commented on Sep 26, 2018

    @touseefbsb

    it looks like the uservoice has 17 votes for this one. @Vijay-Nirmal

  17. added
    for-review 📖
    on Oct 11, 2018
  18. hupo376787 commented on May 23, 2019

    @hupo376787

    23 votes now.
    Does it still under investing?

  19. michael-hawker commented on May 23, 2019

    @michael-hawker
    Member

    @hupo376787 I think this scenario is covered by WinUI now, eh @JustinXinLiu?

    @JustinXinLiu would this just be an example or is there enough code that it should have a helper?

  20. hupo376787 commented on Jul 22, 2019

    @hupo376787

    Hmm,,,

  21. skendrot commented on Jul 22, 2019

    @skendrot
    Contributor

    Anyone wanting a virtualized looping list take a look at this. Great performance the new Repeater from WinUI
    https://github.com/microsoft/InsiderDevTourDemos19/blob/master/Sessions/ui/Uwp.App/Uwp.App/Layouts/VirtualizingUniformCarousalStackLayout.cs

  22. hupo376787 commented on Jul 23, 2019

    @hupo376787

    Thanks, @skendrot . I'll look into it.

  23. michael-hawker commented on Sep 11, 2019

    @michael-hawker
    Member

    Thanks for the link and reminder @skendrot. @JustinXinLiu you going to add this to the toolkit 😉 or is there something missing from it still?

  24. JustinXinLiu commented on Sep 11, 2019

    @JustinXinLiu
    Contributor

    This should be a layout control provided by WinUI. @skendrot would you mind creating an issue on WinUI GitHub page?

  25. birbilis commented on Sep 12, 2019

    @birbilis

    btw, conceptually I'd prefer to just have a Looping Boolean property/attribute somewhere, rather than a separate layout control, however the 2nd case is probably more flexible for modifications (assuming sealing isn't used)

  26. added
    feature request 📬
    on Feb 5, 2020
  27. locked and limited conversation to collaborators on Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    controls 🎛️feature request 📬for-review 📖

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions