Hello everyone, we plan to deprecate the PullToRefreshListView and introduce a kind of AdvancedListView with additional services like:
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:
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!
btw, I like the AdvancedListView name!
Also, isn't there a difference in how to 'toggle' multi select with the build in ListView as in reference to the usage of a ListView in the Windows Phone Outlook mail app?
In the mail app you can start multi selecting by pressing on the left side, there is a touch area available.
Would be a great addition too :)
Too much ideas and not enough coding time :)
@Depechie Agree, I've seen a few open source implementations in other toolkits.
@deltakosh tell me about it! But that's how we get the Advance prefix onto it :wink:
Another idea: shift or control selecting multiple items could switch into multi select mode. A previous version of the Groove Music app did this. It is a very intuitive way to switch to multi select for desktop users.
Would it be possible/useful to add a placeholder for a ListView id source is empty?
So that a view isn't just a blank page, but with a message like "Tap "+" to add new item".
Can't you just use the Empty converter to hide the listview and show a message?
I think one big ListViewControl is a bad idea. We need to make this as lightwaight as we can and open for some kind of extensions. Attached properties is one way to achieve this, I don't know it is the best.
One thing I would like to see is a Go To Top button available for all ListViewBase based controls.
Good call Scott! Header / title click and optional button somewhere...
While we are on the topic, I think the control with depth should be a separate control called TreeView. I have following reasons to support this:
ListView control.ListView is meant to present a flat list of elements. Something like TreeView is almost always about nested collections - a rather tree like structure. Again, Imgur comments.If we are just to present flat list of elements with each element having some depth, that can be achieved with any ListView by binding margin of an element to Depth property. Control level support is not required. I fail to see a use case for such a requirement.
Here are some ideas:
@JerryNixon big yes for the first one, definitely like that one :)
Another idea is to expose ListViewItem.IsSelected into the DataTemplate. An easy approach is to expose an interface like this
public interface IsSelectable
{
bool IsSelected { get; set; }
}
And implement it something like this in the ListView
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
{
try
{
if (item is ISelectable)
{
var binding = new Binding
{
Mode = BindingMode.TwoWay,
Path = new PropertyPath(nameof(ISelectable.IsSelected)),
Source = item,
};
var listViewItem = element as ListViewItem;
listViewItem.SetBinding(ListViewItem.IsSelectedProperty, binding);
}
}
finally
{
base.PrepareContainerForItemOverride(element, item);
}
}
Simple, and ultra-useful.
Another idea is the easy ability to collapse items in a group. Like Hub.SectionHeaderClick, we can add ListView.GroupHeaderClick with arguments that include e.ItemsContainerVisibility.
Another idea is to make the ListView natively implement SemanticZoom. Simply add ListView.SemanticZoomTemplate and ListView.IsSemanticZoomEnalbed. No need to require the developer to freaking wrap the ListView and wire up the CollectionViewSource and so on. Just get the beauty of it, built-in.
Another idea is to add ListView.Refresh(); which will re-render the ListViewItems, pre-processing the ItemTemplateSelector or ItemTemplate. When a visual state needs to alter the content of a DataTemplate, there is no way for it to reach into one or all of the DataTemplates and accomplish this change. For example, you might want to change the layout when the app changes orientation. Calling LIstView.Refresh() would enable the visual state to change the ItemTemplate or the condition of the ItemTemplateSelector.
Another idea is to incorporate the wonderful features of the ListViewPersistenceHelper (https://msdn.microsoft.com/en-us/library/windows/apps/dn625103.aspx) for when the user navigates to and from a long, scrolled list. ListView.GetRelativeScrollPosition() and ListView.SetRelativeScrollPositionAsync() would be very welcome.
Another idea would be to enable through ListView.RequireControlForDeselect=false or something so when ListView.SelectionMode=Single, a selected item can be Deselected without requiring CTRL, which is highly unintuitive to a general user.
@jerrynixon the only problem with the listviewpersistencehelper is it only works if you don't change the ItemsPanelTemplate from the default.
And it doesn't work that well with incrementally loading data, virtualization etc. Better to just set the cache mode on the page
@dotMorten, would you please explain why it doesn't work good with incrementally loading data?
@Viachaslau-Zinkevich I'll venture a guess. When page is cached, the collection bound to it will be cached. But if page is not cached, then depending upon whether the MVVM pattern is used, how ViewModels are instantiated, etc. the collection may or may not be cached.
Now, let's say user was on 5th 'page' of incremental loading collection when she navigated away. Now, when the user navigates back, collection may be newly created and say only 3 pages available. So, scrolling to the 5th page won't make sense until data is reloaded.
That's a lot of GOOD idea. My guts tell me that we need to let the listview unchanged and provides additional tools that can plug on an existing listview.
But in the meantime, for simplicity sake, I also appreciate the idea of the AdvancedListView who inherites from a listview and add all kind of cool ideas we have here
Are there any plans to modify the PullToRefreshLabel to allow object content, i.e. change defaultIndicatorContent from TextBlock to ContentPresenter? This would remove the necessity to subscribe the PullProgressChanged-event for setting a custom icon to RefreshIndicatorContent.
adding @nmetulev
I have created a commit in my fork. Please look at it.
https://github.com/xxMUROxx/UWPCommunityToolkit/commit/ec88926e2993ea05d8a507970196a68111b6002f
It does not have any breaking changes. If you want to include this just tell. I will then create a pull request
There is as least one breaking change: If I templated the control with a PartDefaultIndicatorContent as a textbox, then this update will break it
Not saying we should not do it though
For PullToRefreshLabel, I would instead keep it and mark it as deprecated and introduce a PullToRefreshContent. same for ReleaseToRefreshLabel
One more idea, stolen from Groove: Show a checkbox on mouse hover. When checked, enter MultiSelect mode and select item. This would be awesome as AttachableProperty/Behavior or in AdvancedListView! I also second the other idea for mobile, where touch on left part of items triggers MultiSelect. This is somewhat similar to SlidableListViewItem, but might be a good and easy alternative if only selection is required.
I have pull request #1101 with two attached properties to extend the ListViewBase with an AlternateRowColor and AlternateRowItemTemplate.
Hope someone will review the pull request soon.
Some sort of 'Infinite' scroll Helpers could be useful in order to facilitate and track where scroll position/viewport should be when loading more data above and/or below the current list.
@hawkerm this is available through the ISupportIncrementalLoading interface.
bumping https://github.com/Microsoft/UWPCommunityToolkit/issues/186#issuecomment-242217629
EmptyListTemplate (for zero items, it's too easy not to do)
This would be really helpful.
Whats the current status? Can we close it?
Going to close this thread out as it has a lot of different things in it. Any new requests should be made as separate items. Also, depending on request, it may be better to request them on the Controls repo.
Most helpful comment
Here are some ideas: