TX Text Control .NET for Windows Forms

Remove Method

Method|Introduced in 24.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Removes a control of the type RibbonButton, RibbonComboBox, RibbonLabel, RibbonListView, RibbonTextBox or RibbonSeperator from this collection.

Syntax

public void Remove(Control item);

Parameters

ParameterDescription
item

The control to be removed from this collection.

Examples

The following example removes the first control when the collection is not empty.

if (ribbonItemCollection.Count > 0)
{
    System.Windows.Forms.Control control = ribbonItemCollection[1];
    ribbonItemCollection.Remove(control);
}