Class AttachableCollection<T>
Represents a collection of IAttachedObject with a shared AssociatedObject and provides change notifications to its contents when that AssociatedObject changes.
Inheritance
System.Object
AttachableCollection<T>
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
System.Collections.Specialized.INotifyCollectionChanged
Inherited Members
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.Interactivity
Assembly: OpenSilver.Interactivity.dll
Syntax
public abstract class AttachableCollection<T> : DependencyObjectCollection<T>, IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable, INotifyCollectionChanged, IAttachedObject where T : DependencyObject, IAttachedObject
Type Parameters
Name | Description |
---|---|
T |
Properties
| Improve this Doc View SourceAssociatedObject
The object on which the collection is hosted.
Declaration
protected DependencyObject AssociatedObject { get; }
Property Value
Type | Description |
---|---|
DependencyObject |
Methods
| Improve this Doc View SourceAttach(DependencyObject)
Attaches to the specified object.
Declaration
public void Attach(DependencyObject dependencyObject)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | dependencyObject | The object to attach to. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The IAttachedObject is already attached to a different object. |
Detach()
Detaches this instance from its associated object.
Declaration
public void Detach()
OnAttached()
Called immediately after the collection is attached to an AssociatedObject.
Declaration
protected abstract void OnAttached()
OnDetaching()
Called when the collection is being detached from its AssociatedObject, but before it has actually occurred.
Declaration
protected abstract void OnDetaching()
Explicit Interface Implementations
| Improve this Doc View SourceIAttachedObject.AssociatedObject
Gets the associated object.
Declaration
DependencyObject IAttachedObject.AssociatedObject { get; }
Returns
Type | Description |
---|---|
DependencyObject | The associated object. |
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
System.Collections.Specialized.INotifyCollectionChanged