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:
- System.Object 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 | System.Object | The owner of the collection. |
context | ControlContext | The ControlContext that describes the context of the items in the collection. |
RibbonControlCollection(Object, ControlContext, Nullable<VariantSize>)
Initializes an instance of the RibbonControlCollection
class.
public RibbonControlCollection(object owner, ControlContext context, VariantSize? itemVariantSize)
Parameter | Type | Description |
---|---|---|
owner | System.Object | The owner of the collection. |
context | ControlContext | The ControlContext that describes the context of the items in the collection. |
itemVariantSize | System.Nullable<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.
Item[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 | System.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.
public object Owner { get; }
Property Value
- System.Object:
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 | System.String | The label value to locate in the collection. |
Returns
- System.Boolean:
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 | System.String | The label value to locate in the collection. |
Returns
- System.Int32:
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 | System.Collections.Specialized.NotifyCollectionChangedEventArgs | A System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data. |
Inherited Members
- DeferrableObservableCollection<T>.AddRange(IEnumerable<T>)
- DeferrableObservableCollection<T>.BeginUpdate()
- DeferrableObservableCollection<T>.EndUpdate()
- DeferrableObservableCollection<T>.InsertItem(Int32, T)
- DeferrableObservableCollection<T>.OnPropertyChanged(PropertyChangedEventArgs)
- DeferrableObservableCollection<T>.SetItem(Int32, T)
- DeferrableObservableCollection<T>.ToArray()
- DeferrableObservableCollection<T>.IsDirty
- DeferrableObservableCollection<T>.IsPropertyChangeSuspended