Feature request for Listview
Hello everyone, we plan to deprecate the PullToRefreshListView and introduce a kind of AdvancedListView with additional services like:
- PullToRefresh
- AlternatingDataTemplates
- Always add HorizontalContentAlignment equal to Stretch on ListViewItem
- Non tilt ListView style : so no animation when 'selecting' an item in the ListView, mostly used for glancing at data an no actual selecting is needed
Please use this thread to suggest other ideas
Edit: A great think would be to have both an unique AdvancedListView but also attached properties for every single additional features to allow developers to add on single feature to a random listview
For reference sake, I added my alternating solution because it's fast and small. But it has limitations in the fact that it would only allow brushes. Using a datatemplate selector would be more ideal indeed, but that adds some performance overhead.
Few other things I 'always' tend to add to my projects when working with ListView but are solved with Styles:
- Non tilt ListView style : so no animation when 'selecting' an item in the ListView, mostly used for glancing at data an no actual selecting is needed
- Always add HorizontalContentAlignment equal to Stretch on ListViewItem : why isn't this default in the SDK control ;)
For #1 this is possible already I guess when you set selection to none
YES about number 2, that is such a pain!
Adding #2 to list in my initial post
Adding to @Depechie's non tilt: I have a non-hover style as well for the data glancing (very annoying on desktop with mouse to have hover over elements if you can't select)
Ok adding idea to main list
@Depechie @bartlannoeye no need to use styles for that, just switch to ItemsControl instead of ListView. I've always used listviews only when items need to be selectable, otherwise I switch to ItemsControl by default
@NicoVermeir well depends... if you want to other cool things ( like pull to refresh ) adding it to this merged ListView could be handy.
@NicoVermeir ListView also gives you virtualisation out the box.
@ScottIsAFool ah yes, true. only needed itemscontrol for small collections (around 10-15 items) so far. carry on!
we plan to deprecate the PullToRefreshListView
Well, that was fast! But it would be a much better control. Maybe call it BetterListView or AdvanceListView :wink:
Here's a possible feature: Built-in item hierarchy. If an item is implementing IHierarchicalItem, with a property called Depth, add some padding to it. End result would be something like this:
@haroldma I like that! I like that a lot. Is this something of yours?
This is for 1.2 (and by deprecate I mean:keeping it but asking people to use the main one)
@ScottIsAFool The screenshot is for a random app from google images. BUT here is a screenshot of it on one of my apps: :wink:
@haroldma if you have the basis for it and would be willing to add it to this toolkit, that would be amazing :)
Just try to not add yet another listview :) I would be ideal if this could be an attached property or something we can plug on a random listview
@ScottIsAFool willing and able :wink:
@deltakosh like the idea of an attached property for any ListView but also have it baked into the AdvancedListView.
Will get a PR for this ASAP.
@haroldma I await the PR :D
@haroldma : Completely on the same page. Both are important!