Class ObjectCollection
Implements a collection of objects.
Inheritance
System.Object
System.Collections.ObjectModel.Collection<System.Object>
ObjectCollection
Implements
System.Collections.Generic.IList<System.Object>
System.Collections.Generic.ICollection<System.Object>
System.Collections.Generic.IReadOnlyList<System.Object>
System.Collections.Generic.IReadOnlyCollection<System.Object>
System.Collections.Generic.IEnumerable<System.Object>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<System.Object>.Add(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.Clear()
System.Collections.ObjectModel.Collection<System.Object>.ClearItems()
System.Collections.ObjectModel.Collection<System.Object>.Contains(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.CopyTo(System.Object[], System.Int32)
System.Collections.ObjectModel.Collection<System.Object>.GetEnumerator()
System.Collections.ObjectModel.Collection<System.Object>.IndexOf(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<System.Object>.InsertItem(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<System.Object>.Remove(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.RemoveAt(System.Int32)
System.Collections.ObjectModel.Collection<System.Object>.RemoveItem(System.Int32)
System.Collections.ObjectModel.Collection<System.Object>.SetItem(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.Collection<System.Object>.Count
System.Collections.ObjectModel.Collection<System.Object>.Item[System.Int32]
System.Collections.ObjectModel.Collection<System.Object>.Items
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.Generic.ICollection<System.Object>.IsReadOnly
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.IsFixedSize
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.Collection<System.Object>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Toolkit.dll
Syntax
public class ObjectCollection : Collection<object>, IList<object>, ICollection<object>, IReadOnlyList<object>, IReadOnlyCollection<object>, IEnumerable<object>, IList, ICollection, IEnumerable
Remarks
ObjectCollection is intended to simplify the task of populating an ItemsSource property in XAML.
Examples
<ItemsControl.ItemsSource>
<controls:ObjectCollection>
<TextBlock Text="Object 1" />
<TextBlock Text="Object 2" />
</controls:ObjectCollection>
</ItemsControl.ItemsSource>
Constructors
| Improve this Doc View SourceObjectCollection()
Initializes a new instance of the ObjectCollection class.
Declaration
public ObjectCollection()
ObjectCollection(IEnumerable)
Initializes a new instance of the ObjectCollection class.
Declaration
public ObjectCollection(IEnumerable collection)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | collection | The collection whose elements are copied to the new ObjectCollection. |
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable