RibbonControlCollection<T> Class
Represents an observable collection of ribbon controls.
public class RibbonControlCollection<T> : DeferrableObservableCollection<T> where T : DependencyObject
- Type Parameters:
-
T
-The control type.
- Inheritance:
- object Collection<T> ObservableCollection<T> DeferrableObservableCollection<T> object
- Derived:
- ContextualTabGroupCollection
Constructors
RibbonControlCollection()
Initializes an instance of the RibbonControlCollection
class.
public RibbonControlCollection()
RibbonControlCollection(object, ControlContext)
Initializes an instance of the RibbonControlCollection
class.
public RibbonControlCollection(object owner, ControlContext context)
Parameter | Type | Description |
---|---|---|
owner | object | The owner of the collection. |
context | ControlContext | The ControlContext that describes the context of the items in the collection. |
RibbonControlCollection(object, ControlContext, VariantSize?)
Initializes an instance of the RibbonControlCollection
class.
public RibbonControlCollection(object owner, ControlContext context, VariantSize? itemVariantSize)
Parameter | Type | Description |
---|---|---|
owner | object | The owner of the collection. |
context | ControlContext | The ControlContext that describes the context of the items in the collection. |
itemVariantSize | VariantSize? | A nullable VariantSize that should be assigned to any child IVariantControl items. If |
Properties
Context
Gets the ControlContext that describes the context of the items in the collection.
public ControlContext Context { get; }
Property Value
- ControlContext:
The ControlContext that describes the context of the items in the collection.
this[string]
Gets the item with the specified LabelProperty value.
[C#] In C#, this property is the indexer for the RibbonControlCollection
class.
public T this[string label] { get; }
Parameter | Type | Description |
---|---|---|
label | string | The label value to locate in the collection. |
Property Value
- T:
The item with the specified LabelProperty value.
Owner
Gets the owner of the collection.
Methods
AddRange(T[])
Adds multiple items to the collection.
public void AddRange(T[] items)
Parameter | Type | Description |
---|---|---|
items | T[] | The array of items to add. |
ClearItems()
Removes all items from the collection.
protected override void ClearItems()
Contains(string)
Determines whether an item with the specified LabelProperty value is in the collection.
public bool Contains(string label)
Parameter | Type | Description |
---|---|---|
label | string | The label value to locate in the collection. |
Returns
- bool:
true
if an item with the specified LabelProperty value is found in the collection; otherwise,false
.
IndexOf(string)
Searches for an item with the specified LabelProperty value and returns the zero-based index of the first occurrence within the entire collection.
public int IndexOf(string label)
Parameter | Type | Description |
---|---|---|
label | string | The label value to locate in the collection. |
Returns
- int:
The zero-based index of the first occurrence of an item with the specified LabelProperty value within the entire collection, if found; otherwise,
-1
.
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Raises the CollectionChanged
event with the provided arguments.
protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | NotifyCollectionChangedEventArgs | A NotifyCollectionChangedEventArgs that contains the event data. |
Inherited Members
- DeferrableObservableCollection<T>.AddRange(IEnumerable<T>)
- DeferrableObservableCollection<T>.BeginUpdate()
- DeferrableObservableCollection<T>.EndUpdate()
- DeferrableObservableCollection<T>.InsertItem(int, T)
- DeferrableObservableCollection<T>.OnPropertyChanged(PropertyChangedEventArgs)
- DeferrableObservableCollection<T>.SetItem(int, T)
- DeferrableObservableCollection<T>.ToArray()
- DeferrableObservableCollection<T>.IsDirty
- DeferrableObservableCollection<T>.IsPropertyChangeSuspended
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()