TX Text Control .NET for Windows Forms

Contains 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

Determines whether a control is in the collection.

Syntax

public bool Contains(Control ribbonItem);

Parameters

ParameterDescription
ribbonItem

The item to locate in this collection.

Return Value

True if item is found in this collection. Otherwise, false.

Examples

The following example checks whether the ribbon item collection contains the requested key.

if (ribbonItemCollection.Contains(new System.Windows.Forms.Control()))
{
    Console.WriteLine("Contains completed successfully.");
}