🔹 ObservableCollection Class
namespace Noesis
Represents a dynamic data collection that provides notifications when items get added or removed.
It is frequently used in data binding to display a collection of records within an ItemsControl such as a ListBox, ListView or TreeView.
<ListBox Width="200"
ItemsSource="{Binding Source={StaticResource NameListData}}"
ItemTemplate="{StaticResource NameItemTemplate}" />
Properties
ObservableCollection has no properties
Attached Properties
ObservableCollection has no attached properties
Methods
| Name | Description |
|---|---|
| ◆ Add(T*) | 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 |
| ◆ Contains(const T*) | Determines whether the collection contains a specific value |
| ◆ Get(uint32_t) | Gets the element at the specified index |
| ◆ IndexOf(const T*) | Determines the index of a specific item in the collection. Returns -1 if not found |
| ◆ Insert(uint32_t, T*) | Inserts an item to the collection at the specified index |
| ◆ Remove(const T*) | 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 |
| ◆ Set(uint32_t, T*) | Sets the element at the specified index |
Events
ObservableCollection has no events
📍 On this page