UIElementCollection Class
Encapsulates a collection of IUIElement items.
public class UIElementCollection : LogicalTreeNodeCollection, IDisposable, IList, ICollection, IEnumerable
- Inheritance:
- Object MarshalByRefObject DisposableObject LogicalTreeNodeCollection Object
- Derived:
- BarCommandLinkCollection DockableToolBarRowCollection DockableToolBarRowDockableToolBarCollection StatusBarPanelCollection AutoHideTabCollection AutoHideTabGroupCollection
- Implements:
- IDisposable
Remarks
This class is a zero-based indexed collection.
Constructors
UIElementCollection(IUIElement)
Initializes a new instance of the UIElementCollection
class.
public UIElementCollection(IUIElement owner)
Parameter | Type | Description |
---|---|---|
owner | IUIElement | The owner of the collection. |
Properties
PluralElementName
Gets the short, plural name of the type of child elements in the collection.
protected virtual string PluralElementName { get; }
Property Value
- String:
The short, plural name of the type of child elements in the collection.
Remarks
This value is used within the design-time environment when indicating the count of elements in the collection.
See Also
SingularElementName
Gets the short, singular name of the type of child elements in the collection.
protected virtual string SingularElementName { get; }
Property Value
- String:
The short, singular name of the type of child elements in the collection.
Remarks
This value is used within the design-time environment when indicating the count of elements in the collection.
See Also
Methods
Contains(IUIElement)
Determines whether the specified element is in the collection.
public bool Contains(IUIElement value)
Parameter | Type | Description |
---|---|---|
value | IUIElement | The IUIElement to look for. |
Returns
- Boolean:
true
if the collection contains the element; otherwise,false
.
Dispose(Boolean)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected override void Dispose(bool disposing)
Parameter | Type | Description |
---|---|---|
disposing | Boolean |
|
Remarks
This method is called by the public Dispose
method and the Finalize
method.
Dispose
invokes this method with the disposing
parameter set to true
.
Finalize
invokes this method with disposing
set to false
.
IndexOf(IUIElement)
Returns the index of the specified element in the collection.
public int IndexOf(IUIElement value)
Parameter | Type | Description |
---|---|---|
value | IUIElement | The IUIElement to look for. |
Returns
- Int32:
If found, the index where the element is in the collection; otherwise,
-1
.
OnObjectAdded(Int32, ILogicalTreeNode)
Performs additional custom processes after an object is added to the collection.
protected override void OnObjectAdded(int index, ILogicalTreeNode value)
Parameter | Type | Description |
---|---|---|
index | Int32 | The zero-based index at which the object was inserted. |
value | ILogicalTreeNode | The object that was inserted. |
Remarks
The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified object is added.
OnObjectRemoved(Int32, ILogicalTreeNode)
Performs additional custom processes after an object is removed from the collection.
protected override void OnObjectRemoved(int index, ILogicalTreeNode value)
Parameter | Type | Description |
---|---|---|
index | Int32 | The zero-based index from which the object was removed. |
value | ILogicalTreeNode | The object that was removed. |
Remarks
The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified object is removed.
OnObjectRemoving(Int32, ILogicalTreeNode)
Performs additional custom processes before an object is removed from the collection.
protected override void OnObjectRemoving(int index, ILogicalTreeNode value)
Parameter | Type | Description |
---|---|---|
index | Int32 | The zero-based index from which the object was removed. |
value | ILogicalTreeNode | The object that was removed. |
Remarks
The default implementation of this method is intended to be overridden by a derived class to perform some action before the specified object is removed.
Inherited Members
- LogicalTreeNodeCollection.AddCore(ILogicalTreeNode)
- LogicalTreeNodeCollection.ClearCore()
- LogicalTreeNodeCollection.Contains(ILogicalTreeNode)
- LogicalTreeNodeCollection.CopyTo(Array, Int32)
- LogicalTreeNodeCollection.DisposeAllChildObjects()
- LogicalTreeNodeCollection.GetEnumerator()
- LogicalTreeNodeCollection.IndexOf(ILogicalTreeNode)
- LogicalTreeNodeCollection.InsertCore(Int32, ILogicalTreeNode)
- LogicalTreeNodeCollection.OnObjectAdding(Int32, ILogicalTreeNode)
- LogicalTreeNodeCollection.OnValidate(ILogicalTreeNode, Int32)
- LogicalTreeNodeCollection.RemoveCore(ILogicalTreeNode)
- LogicalTreeNodeCollection.RemoveAllOfTypeCore(Type)
- LogicalTreeNodeCollection.RemoveAtCore(Int32)
- LogicalTreeNodeCollection.SetCore(Int32, ILogicalTreeNode)
- LogicalTreeNodeCollection.AutoAssignParent
- LogicalTreeNodeCollection.Count
- LogicalTreeNodeCollection.InnerList
- LogicalTreeNodeCollection.IsFixedSize
- LogicalTreeNodeCollection.IsReadOnly
- LogicalTreeNodeCollection.IsSynchronized
- LogicalTreeNodeCollection.OwnerCore
- LogicalTreeNodeCollection.SyncRoot
- LogicalTreeNodeCollection.ObjectAdding
- LogicalTreeNodeCollection.ObjectAdded
- LogicalTreeNodeCollection.ObjectRemoving
- LogicalTreeNodeCollection.ObjectRemoved
- DisposableObject.Dispose()
- DisposableObject.VerifyNotDisposed()
- DisposableObject.IsDisposed
- DisposableObject.Disposed
- MarshalByRefObject.MemberwiseClone(Boolean)
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.CreateObjRef(Type)
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()