TX Text Control .NET for Windows Forms

RibbonItemCollection Class

Class|Introduced in 24.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.
Inherits
  1. CollectionBase
  2. RibbonItemCollection
Implements
IEnumerable, IEnumerator

Description

An instance of the RibbonItemCollection class contains controls of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator and can be obtained with the RibbonGroup.RibbonItems, Ribbon.ApplicationMenuHelpPaneItems, Ribbon.ApplicationMenuItems, RibbonMenuButton.DropDownItems or RibbonListView.DropDownItems property. It is inherited from the abstract class System.Collections.CollectionBase and implements the System.Collections.IEnumerable and System.Collections.IEnumerator interfaces. The following describes only the properties, methods and events defined through the RibbonItemCollection class. For a list of properties, methods and events of these classes and interfaces see the .NET Framework reference.

Syntax

public class RibbonItemCollection : CollectionBase, IEnumerable, IEnumerator

Examples

The following example includes the item value from a Ribbon Item Collection object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Item: {ribbonItemCollection[10]}");
Console.WriteLine("Ribbon Item Collection is ready for use.");

Members

Properties

PropertyDescription
CurrentNot described in the reference. public object Current { get; }
ItemGets a control of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator from the collection. This property is the indexer for the RibbonItemCollection class.

Methods

MethodDescription
AddAdds a control of the type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator to the end of the collection.
AddRangeAdds an array of controls to the end of the collection. These controls must be objects of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator.
ContainsDetermines whether a control is in the collection.
InsertInserts a control of the type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator at the specified index.
InsertRangeInserts an array of controls at the specified index. These controls must be objects of type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator.
MoveNextNot described in the reference. public bool MoveNext();
RemoveRemoves a control of the type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator from this collection.
RemoveAtNot described in the reference. public void RemoveAt(int index);
ResetNot described in the reference. public void Reset();