The Extensible Application Markup Language (XAML) proxy of a CollectionView class.
Questions tagged [collectionviewsource]
377 questions
12
votes
2 answers
How to automatically update filter and/or sort order on CollectionViewSource, when an individual item's property changes?
Ok, so this question is related to Windows Phone 7/Silverlight (updated WP7 Tools, Sept 2010), specifically filtering an underlying ObservableCollection.
In mucking about with the WP7 template Pivot control application, I've run into an issue…

Patrick Simpe-Asante
- 285
- 3
- 10
12
votes
3 answers
CollectionViewSource MVVM Implementation for WPF DataGrid
I have implemented small demo of CollectionViewSource for WPF DataGrid in MVVM. I would really appreciate any help to verify the implementation and comment on whether this is the right approach to use CollectionViewSource.
public class ViewModel :…

Lucifer
- 2,317
- 9
- 43
- 67
12
votes
1 answer
Two comboboxes with the same CollectionViewSource ItemSource update each other
On my ViewModel, I have 2 properties (both implement property changed notifications) :
CountryOfIssue
Nationality
On my View, I have a CollectionViewSource pointing to a local instance of my Entity Framework context :

Marcel
- 944
- 2
- 9
- 29
11
votes
3 answers
CollectionViewSource, how to filter data?
I am binding a ComboBox to Entities but I want the data filtered.
Up to now I have tried two ways:
"simple" one: Apply the filter directly to the ObjectSet throught
LINQ to Entities
setting a filtering event handler as described on
msdn
I am…

spiderman
- 1,565
- 2
- 16
- 37
10
votes
3 answers
CollectionViewSource CurrentItem
I am using a CollectionViewSource in a dialog view model that has various filtering requirements, which works fine. I also maintain the equivalent of the selected item in a property (SelectedProject), and I'm wondering if I could / should do away…

Berryl
- 12,471
- 22
- 98
- 182
10
votes
1 answer
WPF DataGrid Filtering - CollectionViewSource Refreshing
I want to know how I can refresh a CollectionViewSource when a button is clicked?
So far I have

user3428422
- 4,300
- 12
- 55
- 119
10
votes
2 answers
sorting a bound ItemsControl in a DataTemplate (XAML only)
Is there a XAML only way to automatically sort the bound items (list of ViewModel object) ItemsControl based on one of the properties of the items. The ItemsControl is part of a DataTemplate. I thought CollectionViewSource would do the trick, but…

bitbonk
- 48,890
- 37
- 186
- 278
9
votes
2 answers
Change list view sort Property / Direction within XAML only
I have a simple ListView and want to sort the contents numerically or alphabetically, ascending or descending. The choice comes from a drop down box. I understand I can use CollectionViewSource to achieve the sorting but how can I alter the…

Chris
- 26,744
- 48
- 193
- 345
9
votes
1 answer
using a CollectionViewSource with HierarchicalDataTemplate
How would you go about using a CollectionViewSource (to supply sorting behavior) in conjunction with a HierarchicalDataTemplate's ItemsSource?
So given the code below, how could I apply sorting on the children at each level in the…

pastillman
- 1,104
- 2
- 16
- 27
9
votes
1 answer
What are the differences between CollectionViewSource, ICollectionView, ListCollectionView, IList and BindingListCollectionView and their use cases?
What are the differences between CollectionViewSource, ICollectionView, ListCollectionView, IList and BindingListCollectionView?
When and where to use all these collections?
I know the main use of CollectionViewSource, but I'm not clear with when to…

Selva
- 1,310
- 2
- 14
- 31
8
votes
1 answer
SelectedItem set to first item with CollectionViewSource
I have a view databound through mvvm light to a viewmodel in my WP7 project.
The view contains a Listbox with following settings:

Depechie
- 6,102
- 24
- 46
8
votes
2 answers
WPF CollectionViewSource Grouping
I'm using a CollectionViewSource to group my data. In my data, I have Property1 and Property2 that I'm needing to group on.
The only stipulation is that I don't want sub-groups of another group. So, when I group by these two properties, I don't…

Miles
- 5,646
- 18
- 62
- 86
8
votes
3 answers
How can I get the CollectionView that is defined in XAML
I wanted to bind to an ObservableCollection in XAML and also apply the grouping there. In principle, this worked fine.
…

primfaktor
- 2,831
- 25
- 34
7
votes
1 answer
Can you use a CollectionViewSource inside a DataTemplate?
Is it possible to explicitly use a CollectionViewSource inside a data template? Normally we'd put the CollectionViewSource in the resources alongside the template, but our model doesn't allow that because the 'source' of the collectionviewsource is…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
7
votes
3 answers
How to handle a CompositeCollection with CollectionView features?
Is there a way to get notified when CompositeCollection's current location changes?
I need to have the CompositeCollection monitored by a CollectionView, any ideas are welcommed.

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632