public DependencyCollectionViewGroupingManagerBase(DependencyCollectionView collectionView) { CollectionView = collectionView; var binding = new Binding { Path = new PropertyPath(nameof(collectionView.IncrementalLoader)), Source = CollectionView }; BindingOperations.SetBinding(this, IncrementalLoaderProperty, binding); }
public DependencyCollectionViewGroup(object groupObject, DependencyCollectionView parentView) { Group = groupObject; var groupItems = new DependencyCollectionView(); GroupItems = groupItems; ParentView = parentView; var loader = new DependencyCollectionViewProxyIncrementalLoader() { InnerLoader = parentView.IncrementalLoader }; groupItems.IncrementalLoader = loader; }
private void InitCollectionViewGroup(DependencyCollectionView view, int count) { if (view.CollectionGroups?.Count != count) { view.CollectionGroups.Clear(); for (int i = 0; i < count; i++) { var g = new DependencyCollectionViewGroup(i, view); view.CollectionGroups.Add(g); } if ((view.CollectionGroups?.Count ?? 0) != 0) { foreach (var item in view) { this.TryAddItemToGroup(item); } } } }
public SelfServiceDependencyCollectionViewGroupBase(object groupObject, DependencyCollectionView parentView) : base(groupObject, parentView) { }
public SelfServiceDependencyDelegateCollectionViewGroup(object groupObject, DependencyCollectionView parentView, Func <ICollectionViewGroup, object, bool> tryAddItemToGroup, Func <ICollectionViewGroup, object, bool> tryRemoveItemFromGroup) : base(groupObject, parentView) { _OnAddingItemToGroup = tryAddItemToGroup; _OnRemovingingItemRemoveGroup = tryRemoveItemFromGroup; }