Version

RibbonTabItem Class

Represents a tab in the XamRibbon. Each RibbonTabItem can contain 1 or more RibbonGroups which are exposed via the RibbonGroups property.
Syntax
'Declaration
 
Public Class RibbonTabItem 
   Inherits Infragistics.Windows.Controls.TabItemEx
   Implements IKeyTipIKeyTipContainer 
Remarks

The RibbonTabItem is a specialized System.Windows.Controls.TabItem designed to be used with the XamRibbon. It can either be directly added to the XamRibbon.Tabs collection or it can be part of a ContextualTabGroup and added to its ContextualTabGroup.Tabs collection.

The RibbonGroups property is used to provide one or more RibbonGroup instances that provide the content for the tab item when it is selected within the XamRibbon (XamRibbon.SelectedTab).

If the tab belongs to a ContextualTabGroup then its ContextualTabGroup property can be used to access the owning group. The IsFirstTabInContextualTabGroup and IsLastTabInContextualTabGroup read-only properties are set the by the ContextualTabGroup to indicate where the tab is visually placed within the tabs collection of the group.

Example
RibbontabItem Sample

Public Partial Class CodeRibbonWindow
    Inherits XamRibbonWindow
   
    Private xamApplicationMenu As ApplicationMenu
    Private xamRibbon As XamRibbon
   
    Public Sub New()
        InitializeComponent()
        initRibbonItems()
        addRibbonItems()
    End Sub
   
    Private Sub initRibbonItems()
        'Create RibbonWindowContentHost
        Dim xamContentHost As New RibbonWindowContentHost()
        Me.Content = xamContentHost
        'Create XamRibbon object
        xamRibbon = New XamRibbon()
        xamContentHost.Ribbon = xamRibbon
        DockPanel.SetDock(xamRibbon, Dock.Top)
    End Sub
   
    'add Tabs in XamRibbon control
    Private Sub addRibbonItems()
        'Add tabItem with Header "Format"
        Dim formatTabItem As New RibbonTabItem()
        formatTabItem.Header = "Format"
        formatTabItem.KeyTip = "Ktp"
        xamRibbon.Tabs.Add(formatTabItem)
       
        'Add RibbonGeoups
        Dim contextualTabItemGroup As RibbonGroup = getRibbonGroup(irTabItem, "ContextualTabItem")
        Dim tabItemRibbonGroup As RibbonGroup = getRibbonGroup(irTabItem, "TabItem")
        Dim formatRibbonGroup As RibbonGroup = getRibbonGroup(irTabItem, "Format")
    End Sub
   
    'Add RibbonGroup to RibbonTabItem
    Private Function getRibbonGroup(ByVal igTabItem As RibbonTabItem, ByVal ribbonGroupCaption As String) As RibbonGroup
        Dim ribbonGroup As New RibbonGroup()
        ribbonGroup.Caption = ribbonGroupCaption
        Dim toolHorizontalWrapPanel As New ToolHorizontalWrapPanel()
        ribbonGroup.Items.Add(toolHorizontalWrapPanel)
        igTabItem.RibbonGroups.Add(ribbonGroup)
        Return ribbonGroup
    End Function
End Class
public partial class CodeRibbonWindow : XamRibbonWindow
{

	ApplicationMenu xamApplicationMenu;
	XamRibbon xamRibbon;
	
	public CodeRibbonWindow()
	{
		InitializeComponent();
		initRibbonItems();
		addRibbonItems();	
	}

	private void initRibbonItems()
	{
		//Create RibbonWindowContentHost
		RibbonWindowContentHost xamContentHost = new RibbonWindowContentHost();
		this.Content = xamContentHost;
		//Create XamRibbon object
		xamRibbon = new XamRibbon();
		xamContentHost.Ribbon = xamRibbon;
		DockPanel.SetDock(xamRibbon, Dock.Top);
	}

   //add Tabs in XamRibbon control
	private void addRibbonItems()
	{
		//Add tabItem with Header "Format"
		RibbonTabItem formatTabItem = new RibbonTabItem();     
		formatTabItem.Header = "Format";
		formatTabItem.KeyTip = "Ktp";
		xamRibbon.Tabs.Add(formatTabItem);
		
		//Add RibbonGeoups
		RibbonGroup contextualTabItemGroup = getRibbonGroup(irTabItem, "ContextualTabItem");
		RibbonGroup tabItemRibbonGroup = getRibbonGroup(irTabItem, "TabItem");
		RibbonGroup formatRibbonGroup = getRibbonGroup(irTabItem, "Format");		
	}
	
	//Add RibbonGroup to RibbonTabItem
	private RibbonGroup getRibbonGroup(RibbonTabItem igTabItem, string ribbonGroupCaption)
	{
		RibbonGroup ribbonGroup = new RibbonGroup();
		ribbonGroup.Caption = ribbonGroupCaption;
		ToolHorizontalWrapPanel toolHorizontalWrapPanel = new ToolHorizontalWrapPanel();
		ribbonGroup.Items.Add(toolHorizontalWrapPanel);
		igTabItem.RibbonGroups.Add(ribbonGroup);
		return ribbonGroup;
	}	
}
<igRibbon:XamRibbon.Tabs>
    
<!--RibbonTabItem-->
    
<igRibbon:RibbonTabItem Header="Format" KeyTip="FRM">
        
<!-- RibbonGroup-->
        
<igRibbon:RibbonGroup Id="Clipboard" Caption="Clipboard">
            
<!--ToolHorizontalWrapPanel-->
            
<igRibbon:ToolHorizontalWrapPanel>
                
<!--ButtonTool-->
                
<igRibbon:ButtonTool Caption="Paste"
                   
igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge"
                   
SmallImage="Images\icons\Ribbon\Paste_16x16.png"
                   
LargeImage="Images\icons\Ribbon\Paste_32x32.png" 
                    
Click="ButtonTool_Click" KeyDown="ButtonTool_KeyDown" />
                
<!--ButtonTool-end-->
                
<!--ButtonGroup-->
                
<igRibbon:ButtonGroup>
                    
<igRibbon:ButtonTool Id="cutTool" SmallImage="Images\icons\Ribbon\EditCut.png" />
                    
<igRibbon:ButtonTool Id="copyTool" SmallImage="Images\icons\Ribbon\EditCopy.png" />
                
</igRibbon:ButtonGroup>
                
<igRibbon:ButtonGroup>
                    
<igRibbon:ButtonTool Id="undoTool" SmallImage="Images\icons\Ribbon\EditUndo.png" />
                    
<igRibbon:ButtonTool Id="redoTool" SmallImage="Images\icons\Ribbon\EditRedo.png" />
                
</igRibbon:ButtonGroup>
                
<!--ButtonGroup-end-->
            
</igRibbon:ToolHorizontalWrapPanel>
            
<!--ToolHorizontalWrapPanel-end-->
        
</igRibbon:RibbonGroup>
        
<!-- End RibbonGroup-->


        
<!-- End RibbonGroup-->
    
</igRibbon:RibbonTabItem>
</igRibbon:XamRibbon.Tabs>    
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also