Version

ContainsKey Method (ContextualTabGroupCollection)

Determines if the ContextualTabGroupCollection contains an item with the specified key.
Syntax
'Declaration
 
Public Function ContainsKey( _
   ByVal key As String _
) As Boolean
public bool ContainsKey( 
   string key
)

Parameters

key
The ContextualTabGroup key to look for.

Return Value

True if the ContextualTabGroupCollection contains an item with the specified key, otherwise false.
Example
ContextualTabGroupCollection ContainsKey Method

Private xamRibbon As XamRibbon
'Code to Create XamRibbon object..

'Check if ContextualTabGroup contains specified Key
Private Sub ContextualTabGroupsContainsKey(ByVal sender As Object, ByVal e As RoutedEventArgs)
    If xamRibbon.ContextualTabGroups.ContainsKey("CG1") Then
        MessageBox.Show("Contains key CG1")
    Else
        MessageBox.Show("Doesn't contains key CG1")
    End If
End Sub
XamRibbon xamRibbon;
//Code to Create XamRibbon object..

//Check if ContextualTabGroup contains specified  Key
void ContextualTabGroupsContainsKey(object sender, RoutedEventArgs e)
{
	if (xamRibbon.ContextualTabGroups.ContainsKey("CG1"))
	{
		MessageBox.Show("Contains key CG1");
	}
	else
	{
		MessageBox.Show("Doesn't contains key CG1");
	}
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also