Show / Hide Table of Contents

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
DependencyObject
DependencyObjectCollection<T>
AttachableCollection<T>
BehaviorCollection
TriggerActionCollection
TriggerCollection
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
IAttachedObject
Inherited Members
DependencyObjectCollection<T>.CollectionChanged
DependencyObjectCollection<T>.Item[Int32]
DependencyObjectCollection<T>.Count
DependencyObjectCollection<T>.IsReadOnly
DependencyObjectCollection<T>.Add(T)
DependencyObjectCollection<T>.Clear()
DependencyObjectCollection<T>.Contains(T)
DependencyObjectCollection<T>.GetEnumerator()
DependencyObjectCollection<T>.IndexOf(T)
DependencyObjectCollection<T>.Insert(Int32, T)
DependencyObjectCollection<T>.Remove(T)
DependencyObjectCollection<T>.RemoveAt(Int32)
DependencyObjectCollection<T>.CopyTo(T[], Int32)
DependencyObjectCollection<T>.IList.Item[Int32]
DependencyObjectCollection<T>.IList.IsFixedSize
DependencyObjectCollection<T>.ICollection.SyncRoot
DependencyObjectCollection<T>.ICollection.IsSynchronized
DependencyObjectCollection<T>.ICollection.CopyTo(Array, Int32)
DependencyObjectCollection<T>.IList.Add(Object)
DependencyObjectCollection<T>.IList.Contains(Object)
DependencyObjectCollection<T>.IList.IndexOf(Object)
DependencyObjectCollection<T>.IList.Insert(Int32, Object)
DependencyObjectCollection<T>.IList.Remove(Object)
DependencyObjectCollection<T>.IEnumerable.GetEnumerator()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
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>, IDependencyObject, 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 Source

AssociatedObject

The object on which the collection is hosted.

Declaration
protected DependencyObject AssociatedObject { get; }
Property Value
Type Description
DependencyObject

Methods

| Improve this Doc View Source

Attach(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.

| Improve this Doc View Source

Detach()

Detaches this instance from its associated object.

Declaration
public void Detach()
| Improve this Doc View Source

OnAttached()

Called immediately after the collection is attached to an AssociatedObject.

Declaration
protected abstract void OnAttached()
| Improve this Doc View Source

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 Source

IAttachedObject.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
IAttachedObject

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source