Intersoft ClientUI Documentation
ActiveContextualTabs Property
See Also  Send Feedback
Intersoft.Client.UI.Aqua.UXRibbon Namespace > UXRibbonBar Class : ActiveContextualTabs Property






Gets or sets a value that determines which contextual tabs are active.

Syntax

Visual Basic (Declaration) 
<TypeConverterAttribute("†.†, Intersoft.Client.UI.Aqua.UXRibbon, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")>
<CategoryAttribute("Common Properties")>
Public Property ActiveContextualTabs As ObservableCollection(Of String)
Visual Basic (Usage)Copy Code
Dim instance As UXRibbonBar
Dim value As ObservableCollection(Of String)
 
instance.ActiveContextualTabs = value
 
value = instance.ActiveContextualTabs
C# 
[TypeConverterAttribute("†.†, Intersoft.Client.UI.Aqua.UXRibbon, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")]
[CategoryAttribute("Common Properties")]
public ObservableCollection<string> ActiveContextualTabs {get; set;}
Delphi 
public read-write property ActiveContextualTabs: ObservableCollection; 
JScript 
TypeConverterAttribute("†.†, Intersoft.Client.UI.Aqua.UXRibbon, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")
CategoryAttribute("Common Properties")
public function get,set ActiveContextualTabs : ObservableCollection
Managed Extensions for C++ 
[TypeConverterAttribute("†.†, Intersoft.Client.UI.Aqua.UXRibbon, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")]
[CategoryAttribute("Common Properties")]
public: __property ObservableCollection<string*>* get_ActiveContextualTabs();
public: __property void set_ActiveContextualTabs( 
   ObservableCollection<string*>* value
);
C++/CLI 
[TypeConverterAttribute("†.†, Intersoft.Client.UI.Aqua.UXRibbon, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")]
[CategoryAttribute("Common Properties")]
public:
property ObservableCollection<String^>^ ActiveContextualTabs {
   ObservableCollection<String^>^ get();
   void set (    ObservableCollection<String^>^ value);
}

Example

 

Remarks

Contextual tab is a unique ribbon concept that defines the tab's visibility based on a specific context. The contextual tab is useful to hide application commands that are irrelevant unless certain context is available. For example, you can design the ribbon to show the search related commands when the search textbox is focused, such as shown in the illustration below.

To use contextual tab in UXRibbonBar, you need to configure several things as follows:

  • Define a UXRibbonContextualTabGroup with a unique name and some other attributes such as Content for the display text, Background and IndicatorBackground for the visual brushes.
  • Specify which tab belongs to which contextual group. You set the ContextualTabGroupName property to the unique name of UXRibbonContextualTabGroup you defined earlier.
  • Set the ActiveContextualTabs property of UXRibbonBar to determine the active contextual tab groups. To activate multiple contextual tab groups, set the property with each tab group name separated by comma character.

The following code shows how to configure the contextual tabs and set the active contextual tab initially.

XAML Copy Code
<Intersoft:UXRibbonBar RibbonTitle="Documentation" ActiveContextualTabs="TableContextualTabGroup">
        ...
    <Intersoft:UXRibbonBar.ContextualTabGroups>
        <Intersoft:UXRibbonContextualTabGroup x:Name="TableContextualTabGroup" Content="Table" 
                        IndicatorBackground="#FF5BA4F2" Background="#FF0759A5" AutoSelectMode="Always" />
    </Intersoft:UXRibbonBar.ContextualTabGroups>
    <Intersoft:UXRibbonTab Header="Home" />
    <Intersoft:UXRibbonTab Header="Table" ContextualTabGroupName="TableContextualTabGroup" />                
</Intersoft:UXRibbonBar>
        

The result looks like the following figure.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.