UIElementCollection Class
Encapsulates a collection of IUIElement items.
[TypeConverter(typeof(UIElementCollectionConverter))]
public class UIElementCollection : LogicalTreeNodeCollection, IDisposable
- Inheritance:
- object MarshalByRefObject MarshalByRefDisposableObject LogicalTreeNodeCollection object
- Derived:
- BarCommandLinkCollection DockableToolBarRowCollection DockableToolBarRowDockableToolBarCollection StatusBarPanelCollection AutoHideTabCollection AutoHideTabGroupCollection
- Implements:
- IDisposable
Remarks
This class is a zero-based indexed collection.
Constructors
UIElementCollection(IUIElement?)
Encapsulates a collection of IUIElement items.
public UIElementCollection(IUIElement? owner)
| Parameter | Type | Description |
|---|---|---|
| owner | IUIElement | The owner of the collection. |
Remarks
This class is a zero-based indexed collection.
See Also
Properties
PluralElementName
The short, plural name of the type of child elements in the collection.
protected virtual string PluralElementName { get; }
Property Value
Remarks
This value is used within the design-time environment when indicating the count of elements in the collection.
See Also
SingularElementName
The short, singular name of the type of child elements in the collection.
protected virtual string SingularElementName { get; }
Property Value
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
- bool:
trueif the collection contains the element; otherwise,false.
See Also
Dispose(bool)
Releases the unmanaged resources used by the object and optionally releases the managed resources.
protected override void Dispose(bool disposing)
| Parameter | Type | Description |
|---|---|---|
| disposing | bool |
|
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.
See Also
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<IUIElement> GetEnumerator()
Returns
- IEnumerator<IUIElement>:
An enumerator that can be used to iterate through the collection.
See Also
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
- int:
If found, the index where the element is in the collection; otherwise,
-1.
See Also
OnObjectAdded(int, 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 | int | 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.
See Also
OnObjectRemoved(int, 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 | int | 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.
See Also
OnObjectRemoving(int, 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 | int | 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.
See Also
Inherited Members
- LogicalTreeNodeCollection.AddCore(ILogicalTreeNode)
- LogicalTreeNodeCollection.ClearCore()
- LogicalTreeNodeCollection.Contains(ILogicalTreeNode)
- LogicalTreeNodeCollection.CopyTo(ILogicalTreeNode[], int)
- LogicalTreeNodeCollection.DisposeAllChildObjects()
- LogicalTreeNodeCollection.IndexOf(ILogicalTreeNode)
- LogicalTreeNodeCollection.InsertCore(int, ILogicalTreeNode)
- LogicalTreeNodeCollection.OnObjectAdding(int, ILogicalTreeNode)
- LogicalTreeNodeCollection.OnValidate(ILogicalTreeNode, int)
- LogicalTreeNodeCollection.RemoveCore(ILogicalTreeNode)
- LogicalTreeNodeCollection.RemoveAtCore(int)
- LogicalTreeNodeCollection.SetCore(int, ILogicalTreeNode)
- LogicalTreeNodeCollection.AutoAssignParent
- LogicalTreeNodeCollection.Count
- LogicalTreeNodeCollection.InnerList
- LogicalTreeNodeCollection.IsReadOnly
- LogicalTreeNodeCollection.OwnerCore
- LogicalTreeNodeCollection.ObjectAdding
- LogicalTreeNodeCollection.ObjectAdded
- LogicalTreeNodeCollection.ObjectRemoving
- LogicalTreeNodeCollection.ObjectRemoved
- MarshalByRefDisposableObject.Dispose()
- MarshalByRefDisposableObject.VerifyNotDisposed()
- MarshalByRefDisposableObject.IsDisposed
- MarshalByRefDisposableObject.Disposed
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Extension Methods
- ObjectExtensions.TryConvertToDouble(object, out double)
- ObjectExtensions.TryConvertToDouble(object, IFormatProvider, out double)