バージョン

RibbonTabItem クラス

XamRibbon でのタブを表します。各 RibbonTabItem は、RibbonGroups プロパティを介して公開されるひとつ以上の RibbonGroup を含むことができます。
シンタックス
'宣言
 
Public Class RibbonTabItem 
   Inherits Infragistics.Windows.Controls.TabItemEx
   Implements IKeyTipIKeyTipContainer 
解説

RibbonTabItemXamRibbon と使用されるように設計された特別の System.Windows.Controls.TabItem です。これは XamRibbon.Tabs コレクションに直接追加するか、ContextualTabGroup の一部にして ContextualTabGroup.Tabs コレクションに追加することができます。

RibbonGroups プロパティは、XamRibbon(XamRibbon.SelectedTab)内で選択された時にタブ項目にコンテンツを提供するひとつ以上の RibbonGroup インスタンスを提供するために使用されます。

タブが ContextualTabGroup に属する場合、その ContextualTabGroup プロパティは所有するグループにアクセスするために使用できます。IsFirstTabInContextualTabGroup および IsLastTabInContextualTabGroup 読み取りプロパティは、タブがグループのタブ コレクション内に視覚的に配置される場所を示すために ContextualTabGroup によって設定されます。

使用例
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>    
参照