バージョン

GalleryItemGroup クラス

GalleryTool ドロップダウンに GalleryItem の表示を構成するグループ化を定義します。
シンタックス
'宣言
 
Public Class GalleryItemGroup 
   Inherits System.Windows.Controls.ItemsControl
public class GalleryItemGroup : System.Windows.Controls.ItemsControl 
解説

GalleryTool.Groups コレクションに GalleryItemGroup を追加すると、少なくとも 1 つの GalleryItem のキーを GalleryItemGroup の ItemKeys コレクションに追加しない限り、GalleryTool ドロップダウンに GalleryItem が表示されなくなります。

注: GalleryItemGroupGalleryTool.Groups コレクションに追加されたら、GalleryItem が表示される Group の ItemKeys コレクションに を追加することによって、Key に指定されない限り、GalleryTool は、GalleryTool ドロップダウンに GalleryItem を表示しません。

注:GalleryItemGroup はプレビュー領域に表示されないので、GalleryItemGroupGalleryTool.Groups コレクションに追加しても GalleryTool プレビュー領域の GalleryItem の表示に影響を及ぼしません。

使用例
Imports System
Imports System.Windows
Imports Infragistics.Windows.Ribbon


Namespace MyNamespace
    Public Partial Class MyWindow
        Inherits XamRibbonWindow
        Public Sub New()
            InitializeComponent()
        End Sub
       
        Protected Sub LoadGalleryTool()
            Dim galleryTool As New GalleryTool()
            menuTool.Items.Add(galleryTool)
           
            Dim group1 As New GalleryItemGroup()
            group1.Title = "Group1"
           
            Dim group2 As New GalleryItemGroup()
            group2.Title = "Group2"
           
            Dim group3 As New GalleryItemGroup()
            group3.Title = "Group3"
           
            galleryTool.Groups.Add(group1)
            galleryTool.Groups.Add(group2)
            galleryTool.Groups.Add(group3)
            For ind As Integer = 1 To 10
               
                Dim item As New GalleryItem()
                item.Key = "Item" + ind.ToString()
                item.Text = settings.Name
                item.Image = New BitmapImage(New Uri("\Images\ig_office_icon_16.png", UriKind.Relative))
                galleryTool.Items.Add(item)
               
                If ind < 7 Then
                    group1.ItemKeys.Add(Item.Key)
                Else
                    group2.ItemKeys.Add(Item.Key)
                End If
                group3.ItemKeys.Add(item.Key)
            Next
        End Sub
    End Class
End Namespace
using System;
using System.Windows;
using Infragistics.Windows.Ribbon;


namespace MyNamespace
{
    public partial class MyWindow : XamRibbonWindow
    {
        public MyWindow()
        {
            InitializeComponent();
        }

        protected void LoadGalleryTool()
        {
            GalleryTool galleryTool = new GalleryTool();
            menuTool.Items.Add(galleryTool);

            GalleryItemGroup group1 = new GalleryItemGroup();
            group1.Title = "Group1";
            
			GalleryItemGroup group2 = new GalleryItemGroup();
            group2.Title = "Group2";
            
			GalleryItemGroup group3 = new GalleryItemGroup();
            group3.Title = "Group3";
			
            galleryTool.Groups.Add(group1);
            galleryTool.Groups.Add(group2);
            galleryTool.Groups.Add(group3);

            for (int ind = 1; ind <= 10; ind++)
            {
                GalleryItem item = new GalleryItem();
                item.Key = "Item" + ind.ToString();
                item.Text = settings.Name;
                item.Image = new BitmapImage(new Uri("\\Images\\ig_office_icon_16.png", UriKind.Relative));
                galleryTool.Items.Add(item);
				
				if(ind < 7)
				{
					group1.ItemKeys.Add(Item.Key);
				}
				else
				{
					group2.ItemKeys.Add(Item.Key);
				}
                group3.ItemKeys.Add(item.Key);
            }
        }
    }
}
<igRibbon:XamRibbonWindow x:Class="MyWindow"
    
xmlns:igRibbon="http://infragistics.com/Ribbon"
    
xmlns:s="clr-namespace:System;assembly=mscorlib">

  ....

  
<igRibbon:RibbonGroup Id="ConnectionGallery" Caption="ConnectionGallery">
    
<igRibbon:MenuTool ShouldDisplayGalleryPreview="True" Caption="Connections">
      
<igRibbon:GalleryTool Name="galleryTool"
                            
Id="galleryToolID"
                            
AllowResizeDropDown="True"
                            
Caption="Connection"
                            
IsQatCommonTool="True"
                            
ItemBehavior="Button"
                            
ItemClicked="galleryTool_ItemClicked"
                            
KeyTip="GT"
                            
LargeImage="\Images\ig_office_icon_32.png"
                            
SmallImage="\Images\ig_office_icon_16.png"
                            
MaxDropDownColumns="7"
                            
MaxPreviewColumns="7"
                            
MinDropDownColumns="3"
                            
MinPreviewColumns="3"
                            
PreferredDropDownColumns="5"
                            
ActivationInitialActionDelay="1000"
                            
ActivationActionDelay="200">
        
<igRibbon:GalleryTool.Groups>
          
<igRibbon:GalleryItemGroup Title="Group1">
            
<s:String>Item1</s:String>
            
<s:String>Item2</s:String>
            
<s:String>Item3</s:String>
            
<s:String>Item4</s:String>
            
<s:String>Item5</s:String>
            
<s:String>Item6</s:String>
          
</igRibbon:GalleryItemGroup>
          
<igRibbon:GalleryItemGroup Title="Group2">
            
<s:String>Item7</s:String>
            
<s:String>Item8</s:String>
            
<s:String>Item9</s:String>
            
<s:String>Item10</s:String>
          
</igRibbon:GalleryItemGroup>
          
<igRibbon:GalleryItemGroup Title="Group3">
            
<s:String>Item1</s:String>
            
<s:String>Item2</s:String>
            
<s:String>Item3</s:String>
            
<s:String>Item4</s:String>
            
<s:String>Item5</s:String>
            
<s:String>Item6</s:String>
            
<s:String>Item7</s:String>
            
<s:String>Item8</s:String>
            
<s:String>Item9</s:String>
            
<s:String>Item10</s:String>
          
</igRibbon:GalleryItemGroup>
        
</igRibbon:GalleryTool.Groups>

        
<igRibbon:GalleryTool.Items>
          
<igRibbon:GalleryItem Key="Item1" Text="Item1" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item2" Text="Item2" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item3" Text="Item3" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item4" Text="Item4" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item5" Text="Item5" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item6" Text="Item6" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item7" Text="Item7" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item8" Text="Item8" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item9" Text="Item9" Image="\Images\ig_office_icon_16.png"/>
          
<igRibbon:GalleryItem Key="Item10" Text="Item10" Image="\Images\ig_office_icon_16.png"/>
        
</igRibbon:GalleryTool.Items>
      
</igRibbon:GalleryTool>
    
</igRibbon:MenuTool>

  
</igRibbon:RibbonGroup>

  ....

</igRibbon:XamRibbonWindow>
参照