Contextual Tabs

A contextual tab is visible when a particular object in an app is selected. Contextual tabs cannot exist outside a contextual tab group, so we need to create a contextual tab group (RibbonContextualTabGroup) and bind a tab to this group. RibbonContextualTabGroup needs to be added to the Ribbon.ContextualGroups collection:

<!--Contextual Tab Groups-->
    <Fluent:RibbonContextualTabGroup x:Name="toolsGroup"
                                     BorderBrush="Green" />

And associate a tab to this group:

<!--Contextual Tabs-->
<Fluent:RibbonTabItem Header="CT" Group="{Binding ElementName=toolsGroup}" />

RibbonContextualTabGroup is not visible by default. To show or hide a contextual tab you must set the RibbonContextualTabGroup.Visibility property to Visible or Collapsed.