🔹 ItemCollection Class
namespace Noesis | MSDN
Holds the list of items that constitute the content of an ItemsControl.
Properties
| Name | Description |
|---|---|
| ◆ CanFilter | Gets a value that indicates whether this view supports filtering via the Filter property |
| ◆ CanGroup | Gets a value that indicates whether this view supports grouping via GroupDescriptions |
| ◆ CanSort | Gets a value that indicates whether this view supports sorting via SortDescriptions |
| ◆ CurrentItem | Gets the current item in the view |
| ◆ CurrentPosition | Gets the ordinal position of the CurrentItem within the view |
| ◆ IsCurrentAfterLast | Gets a value that indicates whether the CurrentItem of the view is beyond the end of the collection |
| ◆ IsCurrentBeforeFirst | Gets a value that indicates whether the CurrentItem of the view is beyond the beginning of the collection |
| ◆ IsEmpty | Returns a value that indicates whether the resulting view is empty. |
◆ Dependency Property ◆ Reflection Property
Attached Properties
ItemCollection has no attached properties
Methods
| Name | Description |
|---|---|
| ◆ Add(BaseComponent*) | Adds an item to the collection. Returns The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection |
| ◆ AddComponent(BaseComponent*) | Adds an item to the collection. Returns The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection |
| ◆ Clear() | Removes all items from the collection |
| ◆ CollectionChanged() | Occurs when the collection changes |
| ◆ Contains(const BaseComponent*) | Returns a value that indicates whether a given item belongs to this collection view |
| ◆ Count() | Gets the number of items in the collection |
| ◆ CurrentChanged() | Occurs after the CurrentItem has changed |
| ◆ GetComponent(uint32_t) | Gets the item at the specified index |
| ◆ GetItemAt(uint32_t) | Gets the item at the specified index |
| ◆ IndexOf(const BaseComponent*) | Determines the index of a specific item in the collection. Returns -1 if not found |
| ◆ IndexOfComponent(const BaseComponent*) | Determines the index of a specific item in the collection. Returns -1 if not found |
| ◆ Insert(uint32_t, BaseComponent*) | Inserts an item to the collection at the specified index |
| ◆ InsertComponent(uint32_t, BaseComponent*) | Inserts an item to the collection at the specified index |
| ◆ IsReadOnly() | Check if the itemcollection is related to an external collection, and so it is readonly |
| ◆ MoveCurrentTo(BaseComponent*) | Sets the specified item to be the CurrentItem in the view |
| ◆ MoveCurrentToFirst() | Sets the first item in the view as the CurrentItem |
| ◆ MoveCurrentToLast() | Sets the last item in the view as the CurrentItem |
| ◆ MoveCurrentToNext() | Sets the item after the CurrentItem in the view as the CurrentItem |
| ◆ MoveCurrentToPosition(int) | Sets the item at the specified index to be the CurrentItem in the view |
| ◆ MoveCurrentToPrevious() | Sets the item before the CurrentItem in the view as the CurrentItem |
| ◆ Refresh() | Recreates the view |
| ◆ Remove(const BaseComponent*) | Removes the first occurrence of a specific object from the collection. Returns true if item was removed, false to indicate that the item was not found in the collection |
| ◆ RemoveAt(uint32_t) | Removes the item at the specified index |
| ◆ Set(uint32_t, BaseComponent*) | Sets the item at the specified index |
| ◆ SetComponent(uint32_t, BaseComponent*) | Sets the item at the specified index |
| ◆ SetView(CollectionView*) | To be called from ItemsControl when the ItemsSource is assigned with a CollectionView |
Events
ItemCollection has no events
📍 On this page