Classes
AddedRemovedEvent
AlertElement
AnchorContainerElement
ArrowShape
ButtonElement
CanvasElement
CanvasManager
CheckboxElement
CheckboxSkinElement
CollectionChangedEvent
CollectionSort
ColorPickerButtonElement
ColorPickerElement
ContainerBaseElement
CursorDefinition
DataGridColumnDefinition
DataGridDataRenderer
DataGridElement
DataGridHeaderColumnDividerSkinElement
DataGridHeaderElement
DataGridHeaderItemRenderer
DataGridItemData
DataGridItemRendererBase
DataGridLabelItemRenderer
DataListData
DataListElement
DataRendererBaseElement
DataRendererLabelElement
DatePickerButtonElement
DatePickerElement
DispatcherEvent
DrawMetrics
DropdownArrowButtonSkinElement
DropdownBaseElement
DropdownElement
ElementEvent
ElementGridItemClickEvent
ElementKeyboardEvent
ElementListItemClickEvent
ElementMouseEvent
ElementMouseWheelEvent
EllipseShape
EventDispatcher
FillBase
GridContainerElement
GridContainerRowColumnDefinition
ImageElement
IpInputElement
LabelElement
LinearGradientFill
ListCollection
ListContainerElement
ProgressElement
RadioButtonElement
RadioButtonSkinElement
RoundedRectangleShape
ScrollBarElement
ScrollButtonSkinElement
ShapeBase
SkinnableElement
SolidFill
StyleableBase
StyleChangedEvent
StyleData
StyleDefinition
StyleProxy
TextAreaElement
TextElement
TextFieldElement
TextInputElement
TimeInputElement
ToggleButtonElement
ToggleButtonGroup
Tween
ViewportElement


ListCollection

ListCollection is a wrapper for an Array that dispatches "collectionchanged"
events when the collection is modified. This is used by data driven containers
like the DataList or DataGrid to track and respond to changes on their associated data.

Inheritance:     ListCollection ➞ EventDispatcher ➞ Object

Events
Event Defined By
collectionchanged     :    CollectionChangedEvent ListCollection
Dispatched when the collection is modified. CollectionChangedEvents can be of kinds "add", "remove", "update", "reset",
and include the index which has been changed.
 


Public Functions
Show Inherited
Function Defined By
ListCollection(sourceArray) [Constructor] ListCollection
Creates new ListCollection instance.
  sourceArray     :    Array
Backing array to be used as the collection's source. This is used
if you have an existing array you want to give to the ListCollection
to manage. Setting this to null will cause the ListCollection to create
its own internal array.
 
addItem(item) ListCollection
Adds an item to the end of the collection and dispatches a "collectionchanged" "add" event.
  item     :    Object
The item to add to the collection
  returns     :    Object
The item just added to the collection.
 
addItemAt(item, index) ListCollection
Adds an item to the collection at the supplied index and dispatches a "collectionchanged" "add" event.
  item     :    Object
The item to add to the collection
  index     :    int
The index to insert the item.
  returns     :    Object
The item just added to the collection, or null if the index was out of range.
 
clear() ListCollection
Clears the collection and dispatches a "collectionchanged" "reset" event.
 
getCollectionSort() ListCollection
Gets the CollectionSort used when calling sort().
  returns     :    CollectionSort
The CollectionSort to be used when calling sort().
 
getItemAt(index) ListCollection
Gets an item in the collection at the supplied index.
  index     :    int
The index to which to return the collection item.
  returns     :    Object
The collection item or null if the index is out of range.
 
getItemIndex(item) ListCollection
Gets the collection index of the item.
  item     :    Object
The item to which to return the collection index.
  returns     :    int
The collection index or -1 if the item is not in the collection.
 
getLength() ListCollection
Gets the number of elements in the collection.
  returns     :    int
The number of elements in the collection.
 
getSourceArray() ListCollection
Gets the source array currently used for the collection.
  returns     :    Array
The source array currently used for the collection.
 
indexUpdated(index) ListCollection
Dispatches a "collectionchanged" "update" event. When a data objects internal
data is changed, call this to update the Container such as a DataList or DataGrid.
  index     :    int
The index to dispatch the "update" event.
 
removeItem(item) ListCollection
Removes an item from the collection and dispatches a "collectionchanged" "remove" event.
  item     :    Object
The item to remove from the collection.
  returns     :    Object
The item just removed from the collection, or null if the item was not in the collection.
 
removeItemAt(index) ListCollection
Removes an item from the collection at the supplied index and dispatches a "collectionchanged" "remove" event.
  index     :    int
The index to remove the item.
  returns     :    Object
The item just removed to the collection, or null if the index was out of range.
 
replaceItemAt(item, index) ListCollection
Replaces an item in the collection at the supplied index and dispatches a "collectionchanged" "update" event.
  item     :    Object
The new item to which replace the existing item.
  index     :    int
The index to replace.
  returns     :    Object
The item just replaced, or null if the index was out of range.
 
setCollectionSort(collectionSort) ListCollection
Sets the CollectionSort to be used when calling sort().
  collectionSort     :    CollectionSort
The CollectionSort to be used when calling sort(). (or null)
 
setSourceArray(sourceArray) ListCollection
Sets the source array to be used for the collection and dispatches a "collectionchanged" "reset" event.
  sourceArray     :    Array
The source array to be used for the collection.
 
sort() ListCollection
Sorts the collection and dispatches a "collectionchanged" "reset" event.