In This Article

BarKeyboardShortcutCollection Class

Encapsulates a collection of BarKeyboardShortcut objects.

[TypeConverter(typeof(BarKeyboardShortcutCollectionConverter))]
public class BarKeyboardShortcutCollection : SimpleCollection<BarKeyboardShortcut>
Inheritance:
object Collection<BarKeyboardShortcut> SimpleCollection<BarKeyboardShortcut> object

Remarks

This class is a zero-based indexed collection.

Properties

DefaultComparer

Defines the default comparer to be used when sorting. If an explicit default is not defined, an implicit default will be used.

protected override IComparer<BarKeyboardShortcut>? DefaultComparer { get; }

Property Value

IComparer<BarKeyboardShortcut>

See Also

Methods

GetApplicableKeyboardShortcutText(BarManager)

Returns the applicable keyboard shortcut text by examining the current mode of the BarManager in use.

public string? GetApplicableKeyboardShortcutText(BarManager barManager)
Parameter Type Description
barManager BarManager

The BarManager to examine.

Returns

string

See Also

OnItemAdded(int, BarKeyboardShortcut)

Performs additional custom processes after an item is added to the collection.

protected override void OnItemAdded(int index, BarKeyboardShortcut value)
Parameter Type Description
index int

The zero-based index at which the item was inserted.

value BarKeyboardShortcut

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

OnItemRemoved(int, BarKeyboardShortcut)

Performs additional custom processes after an item is removed from the collection.

protected override void OnItemRemoved(int index, BarKeyboardShortcut value)
Parameter Type Description
index int

The zero-based index from which the item was removed.

value BarKeyboardShortcut

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

OnValidate(BarKeyboardShortcut, int)

Performs additional custom processes when validating a value.

protected override void OnValidate(BarKeyboardShortcut value, int existingIndex)
Parameter Type Description
value BarKeyboardShortcut

The object to validate.

existingIndex int

The index within the collection of the object that would be replaced by the value.

Remarks

The default implementation of this method determines whether value is null, and if so, throws ArgumentNullException. It is intended to be overridden by a derived class to perform additional action when the specified element is validated.

See Also

Inherited Members

Extension Methods

See Also