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"); } }