Ejemplo n.º 1
0
        public MixedItemSourceCollection(ItemCollectionBase <TItem> itemCollection, IEnumerable sourceCollection, int itemCollectionSplitIndex)
        {
            IndexedSourceCollection  = new IndexedEnumerable(sourceCollection);
            SourceCollection         = sourceCollection;
            ItemCollectionSplitIndex = itemCollectionSplitIndex >= 0 ? itemCollectionSplitIndex.Clamp(0, itemCollection.Count) : itemCollection.Count;
            ItemCollection           = itemCollection;

            if (SourceCollection is INotifyCollectionChanged incc)
            {
                incc.CollectionChanged += OnSourceCollectionChanged;
            }

            ((INotifyCollectionChanged)itemCollection).CollectionChanged += OnItemCollectionChanged;
        }
Ejemplo n.º 2
0
 protected ItemCollectionSourceBase(IItemsHost <TItem> itemsHost, ItemCollectionBase <TControl, TItem> itemCollection)
 {
     ItemsHost      = itemsHost;
     ItemCollection = itemCollection;
 }
Ejemplo n.º 3
0
 public ItemDependencyObjectCollection(ItemCollectionBase <TItemsControl, TItem> itemCollection)
 {
     ItemCollection = itemCollection;
 }
Ejemplo n.º 4
0
 // ReSharper disable once SuggestBaseTypeForParameter
 protected ItemCollectionSelectorAdvisor(ISelector <TItem> selector, ItemCollectionBase <TControl, TItem> collection) : base(selector, collection)
 {
     collection.AttachObserver(this);
 }
Ejemplo n.º 5
0
 public ItemCollectionSource(IItemsHost <TItem> itemsHost, ItemCollectionBase <TControl, TItem> itemCollection) : base(itemsHost, itemCollection)
 {
 }
Ejemplo n.º 6
0
        public VirtualItemCollectionSource(IVirtualItemsHost <TItem> itemsHost, ItemCollectionBase <TControl, TItem> itemCollection) : base(itemsHost, itemCollection)
        {
            VirtualCollection = new VirtualItemCollection(itemCollection);

            itemsHost.VirtualSource = VirtualCollection;
        }