BarCommandLinkCollection Class
Represents a collection of BarCommandLink objects.
public class BarCommandLinkCollection : UIElementCollection, IDisposable
- Inheritance:
- object MarshalByRefObject DisposableObject LogicalTreeNodeCollection UIElementCollection object
- Implements:
- IDisposable
Properties
this[int]
Gets the item at the specified index.
[C#] In C#, this property is the indexer for the BarCommandLinkCollection
class.
public BarCommandLink this[int index] { get; }
Parameter | Type | Description |
---|---|---|
index | int | The index of the item to return. |
Property Value
- BarCommandLink:
The BarCommandLink at the specified index.
this[string]
Gets the first BarCommandLink in the collection that is based on a BarCommand with the specified FullName.
[C#] In C#, this property is the indexer for the BarCommandLinkCollection
class.
public BarCommandLink this[string commandFullName] { get; }
Parameter | Type | Description |
---|---|---|
commandFullName | string | The FullName to locate in the collection. |
Property Value
- BarCommandLink:
The first BarCommandLink in the collection that is based on a BarCommand with the specified FullName.
SingularElementName
Gets the short, singular name of the type of child elements in the collection.
protected override 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
Add(BarCommandLink)
Adds the specified item to the collection.
public BarCommandLink Add(BarCommandLink item)
Parameter | Type | Description |
---|---|---|
item | BarCommandLink | The BarCommandLink to add to the collection. |
Returns
- BarCommandLink:
The BarCommandLink that was created.
AddRange(BarCommandLink[])
Adds multiple items to the collection.
public void AddRange(BarCommandLink[] items)
Parameter | Type | Description |
---|---|---|
items | BarCommandLink[] | The array of BarCommandLink objects to add. |
Clear()
Removes all items from the collection.
public void Clear()
CloneToArray()
Copies the items of the collection to a new BarCommandLink array.
Contains(string)
Determines whether a BarCommandLink that is based on a BarCommand with the specified FullName is in the collection.
public virtual bool Contains(string commandFullName)
Parameter | Type | Description |
---|---|---|
commandFullName | string | The FullName to locate in the collection. |
Returns
- bool:
true
if a BarCommandLink that is based on a BarCommand with the specified FullName is in the collection; otherwise,false
.
FindNextVisibleCommandLink(int)
Returns the index of the next visible BarCommandLink that occurs after the specified index.
public int FindNextVisibleCommandLink(int startIndex)
Parameter | Type | Description |
---|---|---|
startIndex | int | The index of the exclusive starting point of the search. |
Returns
- int:
The index of the next visible BarCommandLink that occurs after the specified index.
FindPreviousVisibleCommandLink(int)
Returns the index of the next visible BarCommandLink that occurs before the specified index.
public int FindPreviousVisibleCommandLink(int startIndex)
Parameter | Type | Description |
---|---|---|
startIndex | int | The index of the exclusive starting point of the search. |
Returns
- int:
The index of the next visible BarCommandLink that occurs before the specified index.
IndexOf(string, bool)
Searches for a BarCommandLink that is based on a BarCommand with the specified FullName, and returns the zero-based index of the first occurrence within the entire collection.
public virtual int IndexOf(string commandFullName, bool visibleOnly)
Parameter | Type | Description |
---|---|---|
commandFullName | string | The FullName to locate in the collection. |
visibleOnly | bool | Whether to only look for visible command links. |
Returns
- int:
The zero-based index of the first occurrence of a BarCommandLink that is based on a BarCommand with the specified FullName within the entire collection, if found; otherwise,
-1
.
IndexOf(string, string, int, bool)
Searches for a BarCommandLink that is based on a BarCommand with the specified FullName, and returns the zero-based index of the first occurrence at or after the start index.
public virtual int IndexOf(string commandFullName, string defaultText, int startIndex, bool visibleOnly)
Parameter | Type | Description |
---|---|---|
commandFullName | string | The FullName to locate in the collection. |
defaultText | string | The default text of the BarCommandLink. This value can be |
startIndex | int | The start index to search. |
visibleOnly | bool | Whether to only look for visible command links. |
Returns
- int:
The zero-based index of the first occurrence of a BarCommandLink that is based on a BarCommand with the specified FullName at or after the start index, if found; otherwise,
-1
.
Insert(int, BarCommandLink)
Inserts a BarCommandLink into the collection at the specified index.
public BarCommandLink Insert(int index, BarCommandLink item)
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index at which the BarCommandLink should be inserted. |
item | BarCommandLink | The BarCommandLinkto insert. |
Returns
- BarCommandLink:
The BarCommandLink that was inserted.
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.
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.
OnValidate(ILogicalTreeNode, int)
Performs additional custom processes when validating a value.
protected override void OnValidate(ILogicalTreeNode value, int existingIndex)
Parameter | Type | Description |
---|---|---|
value | ILogicalTreeNode | The object to validate. |
existingIndex | int | The index within the collection of the object that would be replaced by the value. |
Remove(BarCommandLink)
Removes the specified item from the collection.
public void Remove(BarCommandLink item)
Parameter | Type | Description |
---|---|---|
item | BarCommandLink | The BarCommandLink to remove. |
RemoveAt(int)
Removes the BarCommandLink at the specified index in the collection.
public void RemoveAt(int index)
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the BarCommandLink to be removed. |
ToArray()
Copies the items of the collection to a new BarCommandLink array.
Inherited Members
- UIElementCollection.Contains(IUIElement)
- UIElementCollection.Dispose(bool)
- UIElementCollection.IndexOf(IUIElement)
- UIElementCollection.OnObjectRemoved(int, ILogicalTreeNode)
- UIElementCollection.PluralElementName
- LogicalTreeNodeCollection.AddCore(ILogicalTreeNode)
- LogicalTreeNodeCollection.ClearCore()
- LogicalTreeNodeCollection.Contains(ILogicalTreeNode)
- LogicalTreeNodeCollection.CopyTo(Array, int)
- LogicalTreeNodeCollection.DisposeAllChildObjects()
- LogicalTreeNodeCollection.GetEnumerator()
- LogicalTreeNodeCollection.IndexOf(ILogicalTreeNode)
- LogicalTreeNodeCollection.InsertCore(int, ILogicalTreeNode)
- LogicalTreeNodeCollection.OnObjectAdding(int, ILogicalTreeNode)
- LogicalTreeNodeCollection.RemoveCore(ILogicalTreeNode)
- LogicalTreeNodeCollection.RemoveAllOfTypeCore(Type)
- LogicalTreeNodeCollection.RemoveAtCore(int)
- LogicalTreeNodeCollection.SetCore(int, 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.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()