Contains Method
- Namespace
TXTextControl.Windows. Forms. Ribbon
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Determines whether a control is in the collection.
Syntax
public bool Contains(Control ribbonItem);Public Function Contains(ribbonItem As Control) As BooleanParameters
| Parameter | Description |
|---|---|
| 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.");
}If ribbonItemCollection.Contains(New System.Windows.Forms.Control()) Then
Console.WriteLine("Contains completed successfully.")
End If