Ribbon.ContextualTabGroups Property
Gets a collection that contains all of the RibbonContextualTabGroup items in the Ribbon.
Namespace: Microsoft.Windows.Controls.Ribbon
Assembly: RibbonControlsLibrary (in RibbonControlsLibrary.dll)
Syntax
'Declaration
<BindableAttribute(True)> _
Public ReadOnly Property ContextualTabGroups As Collection(Of RibbonContextualTabGroup)
[BindableAttribute(true)]
public Collection<RibbonContextualTabGroup> ContextualTabGroups { get; }
[BindableAttribute(true)]
public:
property Collection<RibbonContextualTabGroup^>^ ContextualTabGroups {
Collection<RibbonContextualTabGroup^>^ get ();
}
[<BindableAttribute(true)>]
member ContextualTabGroups : Collection<RibbonContextualTabGroup>
function get ContextualTabGroups () : Collection<RibbonContextualTabGroup>
Property Value
Type: System.Collections.ObjectModel.Collection<RibbonContextualTabGroup>
The collection of RibbonContextualTabGroup items in the Ribbon if one exists; otherwise, a new empty collection.
Remarks
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.
Examples
The following example shows a RibbonTab named Pens that is in the Ink Tools contextual tab group.
</ribbon:Ribbon>
<ribbon:RibbonTab Name="Pens" Header="Pens" ContextualTabGroupHeader="Ink Tools" >
<!-- Ribbon Tab Content -->
</ribbon:RibbonTab>
<ribbon:Ribbon.ContextualTabGroups>
<ribbon:RibbonContextualTabGroup Header="Ink Tools" Visibility="Visible" Background="Green" />
</ribbon:Ribbon.ContextualTabGroups>
</ribbon:Ribbon>
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.