Export (0) Print
Expand All

Ribbon.ContextualTabGroups Property

.NET Framework 4.5

Gets a collection that contains all of the RibbonContextualTabGroup items in the Ribbon.

Namespace:  System.Windows.Controls.Ribbon
Assembly:  System.Windows.Controls.Ribbon (in System.Windows.Controls.Ribbon.dll)

public Collection<RibbonContextualTabGroup> ContextualTabGroups { get; }

Property Value

Type: System.Collections.ObjectModel.Collection<RibbonContextualTabGroup>
The collection of RibbonContextualTabGroup items in the Ribbon if one exists; otherwise, a new empty collection.

You use a contextual tab to display groups of commands that are relevant only in a particular context. Contextual tab groups are shown or hidden based on specified criteria. For example, an Ink Tools tab group might be shown when tablet input is detected, or a Picture Tools tab group might be shown when an Image object is selected.

The following example shows a RibbonTab named Pens that is in the Ink Tools contextual tab group.

    <ribbon:RibbonTab Name="Pens" Header="Pens" ContextualTabGroupHeader="Ink Tools" >
    <!-- Ribbon Tab Content -->
        <ribbon:RibbonContextualTabGroup Header="Ink Tools" Visibility="Visible" Background="Green" />

.NET Framework

Supported in: 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft