コード例 #1
0
        public DependencyCollectionViewGroupingManagerBase(DependencyCollectionView collectionView)
        {
            CollectionView = collectionView;

            var binding = new Binding
            {
                Path   = new PropertyPath(nameof(collectionView.IncrementalLoader)),
                Source = CollectionView
            };

            BindingOperations.SetBinding(this, IncrementalLoaderProperty, binding);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
        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);
                    }
                }
            }
        }
コード例 #4
0
 public SelfServiceDependencyCollectionViewGroupBase(object groupObject, DependencyCollectionView parentView)
     : base(groupObject, parentView)
 {
 }
コード例 #5
0
 public SelfServiceDependencyDelegateCollectionViewGroup(object groupObject, DependencyCollectionView parentView, Func <ICollectionViewGroup, object, bool> tryAddItemToGroup, Func <ICollectionViewGroup, object, bool> tryRemoveItemFromGroup)
     : base(groupObject, parentView)
 {
     _OnAddingItemToGroup          = tryAddItemToGroup;
     _OnRemovingingItemRemoveGroup = tryRemoveItemFromGroup;
 }