Repository navigation
Feature request: LoopItemsPanel #3964
Replies: 32 comments
|
Is this not a Carousel that loops? Why not add a loop option to that control? |
|
@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. |
|
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. |
|
@mdtauk I get this idea from Microsoft blog post. They have explained it with a sample code. |
|
I like the idea of generalizing this. I think the sticking point as @mdtauk mentioned is how the scrollbar behaves with each control. |
|
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 |
|
...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) |
|
I'm actually the author of the LoopItemsPanel, and the Carousel control. I think (in my opinion) the question is :
|
|
@Mimetis In my opinion "create an |
|
The |
|
@Mimetis, what about creating a LoopItemsPanel and extending the CarouselPanel from the LooptemsPanel to get the looping experience? |
|
BTW, how are you doing the looping? Are you using some Enumerable implementation that yields items infinitely by looping a cursor over a collection of items? (and having some property on whether it loops at end or not?)
However, since Enumerables are one direction only, I wonder how they’d be used, so guess you’re not using such. Or have Enumerables evolved since last time I checked them?
|
|
@birbilis : As explained in the blog post, it' all about positioning items during the @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. |
|
When doing UI virtualization (say when you have tons of elements to display) I thought that the idea was to have a fixed number of UI items and reuse them. Do you mean you're rearranging that fixed number of items for more speed (wonder if it is faster than just repopulating different ones of the existing UI items) or that you have one UI item per element (no virtualization)? |
|
Agree that the best place to start is with the LoopItemsTemplate. I think we will learn a lot on how to do the same for the carousel in the process. I also agree that virtualization is a requirement for a panel such as this. |
|
I had collected some related links here: is UWP doing things differently there compared to WPF's approach? |
|
Well, most importantly, the WPF VirtualizingPanel is NOT sealed. |
|
in that case I'd go for:
|
|
indeed, at "WPF has a built in virtualizing panel called VirtualizingStackPanel that supports UI virtualization and lays out its children like StackPanel. ListBox uses this panel by default. However, if you want to lay out your children differently, you need to write your own Panel that supports virtualization. WPF has a VirtualizingPanel class you can descend from to do this, but it’s still a fair amount of work. I’ll describe how to write your own virtualizing panel in this series of posts." |
|
I created a UserVoice item for this a few months back. |
|
Whats the current status? |
|
it looks like the uservoice has 17 votes for this one. @Vijay-Nirmal |
|
23 votes now. |
|
@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? |
|
Hmm,,, |
|
Anyone wanting a virtualized looping list take a look at this. Great performance the new Repeater from WinUI |
|
Thanks for the link and reminder @skendrot. @JustinXinLiu you going to add this to the toolkit 😉 or is there something missing from it still? |
|
This should be a layout control provided by WinUI. @skendrot would you mind creating an issue on WinUI GitHub page? |
|
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) |
Uh oh!
There was an error while loading. Please reload this page.
This control helps dev to easy achieve looping Items in ItemsControl.
There is a Microsoft blog post to create this Panel.
I found a similar UserVoice
All reactions