Feature request: LoopItemsPanel #3964
Replies: 32 comments
-
Is this not a Carousel that loops? Why not add a loop option to that control? |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@mdtauk I get this idea from Microsoft blog post. They have explained it with a sample code. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of generalizing this. I think the sticking point as @mdtauk mentioned is how the scrollbar behaves with each control. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
...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) |
Beta Was this translation helpful? Give feedback.
-
I'm actually the author of the LoopItemsPanel, and the Carousel control. I think (in my opinion) the question is :
|
Beta Was this translation helpful? Give feedback.
-
@Mimetis In my opinion "create an |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
@Mimetis, what about creating a LoopItemsPanel and extending the CarouselPanel from the LooptemsPanel to get the looping experience? |
Beta Was this translation helpful? Give feedback.
-
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?
|
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
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)? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
I had collected some related links here: is UWP doing things differently there compared to WPF's approach? |
Beta Was this translation helpful? Give feedback.
-
Well, most importantly, the WPF VirtualizingPanel is NOT sealed. |
Beta Was this translation helpful? Give feedback.
-
in that case I'd go for:
|
Beta Was this translation helpful? Give feedback.
-
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." |
Beta Was this translation helpful? Give feedback.
-
I created a UserVoice item for this a few months back. |
Beta Was this translation helpful? Give feedback.
-
Whats the current status? |
Beta Was this translation helpful? Give feedback.
-
it looks like the uservoice has 17 votes for this one. @Vijay-Nirmal |
Beta Was this translation helpful? Give feedback.
-
23 votes now. |
Beta Was this translation helpful? Give feedback.
-
@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? |
Beta Was this translation helpful? Give feedback.
-
Anyone wanting a virtualized looping list take a look at this. Great performance the new Repeater from WinUI |
Beta Was this translation helpful? Give feedback.
-
Thanks, @skendrot . I'll look into it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the link and reminder @skendrot. @JustinXinLiu you going to add this to the toolkit 😉 or is there something missing from it still? |
Beta Was this translation helpful? Give feedback.
-
This should be a layout control provided by WinUI. @skendrot would you mind creating an issue on WinUI GitHub page? |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions