편집

다음을 통해 공유


Ribbon.ContextualTabGroups Property

Definition

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

public:
 property System::Collections::ObjectModel::Collection<System::Windows::Controls::Ribbon::RibbonContextualTabGroup ^> ^ ContextualTabGroups { System::Collections::ObjectModel::Collection<System::Windows::Controls::Ribbon::RibbonContextualTabGroup ^> ^ get(); };
[System.ComponentModel.Bindable(true)]
public System.Collections.ObjectModel.Collection<System.Windows.Controls.Ribbon.RibbonContextualTabGroup> ContextualTabGroups { get; }
[<System.ComponentModel.Bindable(true)>]
member this.ContextualTabGroups : System.Collections.ObjectModel.Collection<System.Windows.Controls.Ribbon.RibbonContextualTabGroup>
Public ReadOnly Property ContextualTabGroups As Collection(Of RibbonContextualTabGroup)

Property Value

The collection of RibbonContextualTabGroup items in the Ribbon if one exists; otherwise, a new empty collection.

Attributes

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>

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.

Applies to