Class PresentationFrameworkCollection<T>
Provides a common collection class for Silverlight collections.
Inheritance
Implements
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public abstract class PresentationFrameworkCollection<T> : DependencyObject, IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
Type Parameters
Name | Description |
---|---|
T | Type constraint for type safety of the constrained collection implementation. |
Fields
| Improve this Doc View SourceCountProperty
Identifies the Count dependency property.
Declaration
public static readonly DependencyProperty CountProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceCount
Gets the number of elements contained in the PresentationFrameworkCollection<T>.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsFixedSize
Gets a value indicating whether the PresentationFrameworkCollection<T> has a fixed size.
Declaration
public bool IsFixedSize { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the PresentationFrameworkCollection<T> has a fixed size; otherwise, false. |
IsReadOnly
Gets a value indicating whether the PresentationFrameworkCollection<T> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the PresentationFrameworkCollection<T> is read-only; otherwise, false. |
IsSynchronized
Gets a value indicating whether access to the PresentationFrameworkCollection<T> is synchronized (thread safe).
Declaration
public bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if access to the PresentationFrameworkCollection<T> is synchronized (thread safe); otherwise, false. |
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public T this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get or set. |
Property Value
Type | Description |
---|---|
T | The element at the specified index. |
SyncRoot
Gets an object that can be used to synchronize access to the PresentationFrameworkCollection<T>.
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
System.Object | An object that can be used to synchronize access to the PresentationFrameworkCollection<T>. |
Methods
| Improve this Doc View SourceAdd(T)
Adds an item to the PresentationFrameworkCollection<T>.
Declaration
public void Add(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The object to add. |
Clear()
Removes all items from the PresentationFrameworkCollection<T>.
Declaration
public void Clear()
Contains(T)
Determines whether the PresentationFrameworkCollection<T> contains a specific value.
Declaration
public bool Contains(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The object to locate in the PresentationFrameworkCollection<T>. |
Returns
Type | Description |
---|---|
System.Boolean | true if the object is found in the PresentationFrameworkCollection<T>; otherwise, false. |
CopyTo(T[], Int32)
Copies the elements of the PresentationFrameworkCollection<T> to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(T[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | The one-dimensional System.Array that is the destination of the elements copied from the PresentationFrameworkCollection<T>. The System.Array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
CopyTo(Array, Int32)
Copies the elements of the PresentationFrameworkCollection<T> to an System.Array, starting at a particular System.Array index.
Declaration
public void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | array | The one-dimensional System.Array that is the destination of the elements copied from the PresentationFrameworkCollection<T>. The System.Array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<T> | An System.Collections.IEnumerator object that can be used to iterate through the collection. |
IndexOf(T)
Determines the index of a specific item in the PresentationFrameworkCollection<T>.
Declaration
public int IndexOf(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The object to locate in the PresentationFrameworkCollection<T>. |
Returns
Type | Description |
---|---|
System.Int32 | The index of value if found in the list; otherwise, an exception. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The object was not found in the list. |
Insert(Int32, T)
Inserts an item to the PresentationFrameworkCollection<T> at the specified index.
Declaration
public void Insert(int index, T value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value should be inserted. |
T | value | The object to insert into the PresentationFrameworkCollection<T>. |
Remove(T)
Removes the first occurrence of a specific object from the PresentationFrameworkCollection<T>.
Declaration
public bool Remove(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The object to remove from the PresentationFrameworkCollection<T>. |
Returns
Type | Description |
---|---|
System.Boolean | true if an object was removed; otherwise, false. |
RemoveAt(Int32)
Removes the item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
IList.Add(Object)
Declaration
int IList.Add(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type | Description |
---|---|
System.Int32 |
IList.Contains(Object)
Declaration
bool IList.Contains(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type | Description |
---|---|
System.Boolean |
IList.IndexOf(Object)
Declaration
int IList.IndexOf(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type | Description |
---|---|
System.Int32 |
IList.Insert(Int32, Object)
Declaration
void IList.Insert(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
System.Object | value |
IList.Item[Int32]
Declaration
object IList.this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
System.Object |
IList.Remove(Object)
Declaration
void IList.Remove(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
IList.RemoveAt(Int32)
Declaration
void IList.RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |