Questions tagged [collectionviewsource]

The Extensible Application Markup Language (XAML) proxy of a CollectionView class.

377 questions
7
votes
1 answer

CompositeCollection/CollectionViewSource confusion

I'm a little confused about how the data binding works when using these types. I've read that you can't do the following public partial class Window1 : Window { public ObservableCollection Items { get; private set; } …
7
votes
3 answers

How to associate custom data with a CollectionViewGroup?

I've got an ItemsControl in XAML where I am displaying an expander for each group so I can expand/collapse the group. I want to persist the state of the IsExpanded property (and potentially other settings relating to the display of the group…
7
votes
1 answer

CollectionViewSource, Design Time Data, Blend and Windows 8

I have a problem in showing Design Time data in blend here is my code This is my collection view source:
Amit Raz
  • 5,370
  • 8
  • 36
  • 63
7
votes
1 answer

Binding a CollectionViewSource to ObservableCollection

Cannot bind the CollectionViewSource DocProps is a public property public ObservableCollection DocProps1 DataContext is self DataContext="{Binding RelativeSource={RelativeSource self}}" This works
paparazzo
  • 44,497
  • 23
  • 105
  • 176
7
votes
2 answers

Confused about CollectionViewSource (SelectedItem not working in combos)

I have a bunch of combos that all share the same available choices. These choices are provided in a collection exposed from my ViewModel. All fine and dandy. I now want these choices sorted, so I decided to expose an ICollectionView from my…
GazTheDestroyer
  • 20,722
  • 9
  • 70
  • 103
6
votes
4 answers

Binding with CollectionViewSource

I am trying to implement some combo box sorting using CollectionViewSource. This combo box is actually part of a data template and is repeated in a list view. My first approach seemed to work (using CollectionViewSource) but all my combo boxes…
SRM
  • 1,377
  • 1
  • 10
  • 17
6
votes
1 answer

async CollectionViewSource filtering?

I got really big ObservableCollection and I need to provide user-friendly filtering on it. public static async Task RefilterViewAsync(this ItemsControl @this, Predicate compareLogic) { await Task.Run( () => { …
52hertz
  • 342
  • 4
  • 16
6
votes
1 answer

Custom sorting logic for groups using CollectionViewSource

I have a list of "stuff" which needs to be filtered then displayed in a grouped and sorted manner. The data needed to calculate the grouping and sorting order is not available as simple properties - there needs to be some work done in code to…
MarcE
  • 3,586
  • 1
  • 23
  • 27
6
votes
1 answer

Why there is no .Net interface for ICollectionView?

Why there is no .Net interface for ICollectionView? Looking at ICollectionView it seems quite obvious to expect for ICollectionView. Am I missing something?
NileshChauhan
  • 5,469
  • 2
  • 29
  • 43
5
votes
1 answer

How to synchronize ListCollectionView.CurrentItem and ListView.SelectedItem?

I have a ViewModel containing a ListCollectionView property, and a View containing a ListView control whose ItemsSource property is data bound to the ListCollectionView: ViewModel: public ListCollectionView Pacientes { get; set; } public…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
5
votes
1 answer

Source for CompositeCollection: why can't I bind against the data context of another control but have to use a CollectionViewSource?

In another question I recently asked, I was told to use a CompositeCollection in order to access various sources for a ListBox. The example used a XmlDataProvider to provide some dummy data. I, however, have a view model, which contains the data. It…
Em1
  • 1,077
  • 18
  • 38
5
votes
3 answers

WPF How to set a maximum amount of results from CollectionViewSource

I am trying to display a set of data using a DataTemplate in an ItemsControl, with the ItemsPanel set as a uniform grid of size 3 x 3. The ItemsSource of the ItemsControl is set to bind to a CollectionViewSource which filters the source collection…
Guy
  • 3,353
  • 24
  • 28
5
votes
1 answer

CollectionViewSource in windows metro app

I have a collection, for which i require 3 different views 1. All data of collection 2. Grouped data (grouping criteria will be modified during application lifecycle ) 3. Filtered data (filter criteria will be modified during application…
Tilak
  • 30,108
  • 19
  • 83
  • 131
4
votes
3 answers

WPF MVVM hierarchy selected item

I am currently implementing the application that displays hierarchy using ListBoxes (please do not suggest using TreeView, ListBoxes are needed). It looks like that in the article: WPF’s CollectionViewSource (with source code). Classes: public…
4
votes
1 answer

WPF DataGrid column header sort arrow disappear after changing the source of its view collection source

I have the following simple code that I can reproduce this problem: XAML:
Leon Zhou
  • 633
  • 6
  • 20
1 2
3
25 26