バージョン

Variants プロパティ

グループがサイズ変更される順序/優先度を決定する GroupVariant インスタンスのコレクションを返します。
シンタックス
'宣言
 
Public ReadOnly Property Variants As Infragistics.Collections.ObservableCollectionExtended(Of GroupVariant)
public Infragistics.Collections.ObservableCollectionExtended<GroupVariant> Variants {get;}
解説

デフォルトでは、Variants コレクションはすべての RibbonGroup で空です。RibbonTabItem 内のすべての RibbonGroups が Variants コレクションに項目を持たない場合、デフォルトのサイズ変更ロジックが使用されます。GroupVariant が RibbonTabItem 内の任意の RibbonGroups に追加されると、サイズ変更アクションだけがグループのサイズ変更をするために使用されます。

MaximumSizeProperty および MinimumSizeProperty 添付プロパティも、RibbonGroup のコンテンツがどのようにサイズ変更可能かを決定するために使用されます。

Variants がどのように使用されるかの詳細は、GroupVariant クラスを参照してください。

使用例
Private Sub addVariantsGroup()
'Add group and use variants
    Dim igTabItem As RibbonTabItem = xamRibbon.Tabs(1)
    'Create RibbonGroup
    Dim ribbonGroup As RibbonGroup = getRibbonGroup(igTabItem, "RibbonGroup Variants")
    'GroupVariant 1
    Dim grpVariant1 As New GroupVariant()
    grpVariant1.Priority = 5
    grpVariant1.ResizeAction = GroupVariantResizeAction.HideGalleryPreview
    'GroupVariant 2
    Dim grpVariant2 As New GroupVariant()
    grpVariant2.Priority = 10
    grpVariant2.ResizeAction = GroupVariantResizeAction.ReduceGalleryPreviewItems
    'GroupVariant 3
    Dim grpVariant3 As New GroupVariant()
    grpVariant3.Priority = 30
    grpVariant3.ResizeAction = GroupVariantResizeAction.ReduceImageAndTextLargeTools
    'GroupVariant 4
    Dim grpVariant4 As New GroupVariant()
    grpVariant4.Priority = 20
    grpVariant4.ResizeAction = GroupVariantResizeAction.ReduceImageAndTextNormalTools
    'GroupVariant 5
    Dim grpVariant5 As New GroupVariant()
    grpVariant5.Priority = 35
    grpVariant5.ResizeAction = GroupVariantResizeAction.ReduceHorizontalWrapRowCount
    'GroupVariant 6
    Dim grpVariant6 As New GroupVariant()
    grpVariant6.Priority = 40
    grpVariant6.ResizeAction = GroupVariantResizeAction.CollapseRibbonGroup
   
    'Add GroupVariants to collection
    ribbonGroup.Variants.Add(grpVariant1)
    ribbonGroup.Variants.Add(grpVariant2)
    ribbonGroup.Variants.Add(grpVariant3)
    ribbonGroup.Variants.Add(grpVariant4)
    ribbonGroup.Variants.Add(grpVariant5)
    ribbonGroup.Variants.Add(grpVariant6)
End Sub
//Add group and use variants
void addVariantsGroup()
{
	RibbonTabItem igTabItem = xamRibbon.Tabs[1];
	//Create RibbonGroup
	RibbonGroup ribbonGroup = getRibbonGroup(igTabItem, "RibbonGroup Variants");
	//GroupVariant 1
	GroupVariant grpVariant1 = new GroupVariant();
	grpVariant1.Priority = 5;
	grpVariant1.ResizeAction = GroupVariantResizeAction.HideGalleryPreview;
	//GroupVariant 2
	GroupVariant grpVariant2 = new GroupVariant();
	grpVariant2.Priority = 10;
	grpVariant2.ResizeAction = GroupVariantResizeAction.ReduceGalleryPreviewItems;
	//GroupVariant 3
	GroupVariant grpVariant3 = new GroupVariant();
	grpVariant3.Priority = 30;
	grpVariant3.ResizeAction = GroupVariantResizeAction.ReduceImageAndTextLargeTools;
	//GroupVariant 4
	GroupVariant grpVariant4 = new GroupVariant();
	grpVariant4.Priority = 20;
	grpVariant4.ResizeAction = GroupVariantResizeAction.ReduceImageAndTextNormalTools;
	//GroupVariant 5
	GroupVariant grpVariant5 = new GroupVariant();
	grpVariant5.Priority = 35;
	grpVariant5.ResizeAction = GroupVariantResizeAction.ReduceHorizontalWrapRowCount;
	//GroupVariant 6
	GroupVariant grpVariant6 = new GroupVariant();
	grpVariant6.Priority = 40;
	grpVariant6.ResizeAction = GroupVariantResizeAction.CollapseRibbonGroup;

	//Add GroupVariants to collection
	ribbonGroup.Variants.Add(grpVariant1);
	ribbonGroup.Variants.Add(grpVariant2);
	ribbonGroup.Variants.Add(grpVariant3);
	ribbonGroup.Variants.Add(grpVariant4);
	ribbonGroup.Variants.Add(grpVariant5);
	ribbonGroup.Variants.Add(grpVariant6);
}
<igRibbon:RibbonGroup Name="VariantsGroup1" Caption="VariantsGroup1" 
    
MaxWidth="600" MaxHeight="150" MinWidth="150" MinHeight="100"
    
KeyTip="RG1" Id="R1" SmallImage="Images\icons\Ribbon\LeftAlign.png"
    
igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" 
    
igRibbon:RibbonGroup.MinimumSize="ImageOnly" >
    
<!--GroupVariants-->
    
<igRibbon:RibbonGroup.Variants>
        
<igRibbon:GroupVariant Priority="5" ResizeAction="HideGalleryPreview" />
        
<igRibbon:GroupVariant Priority="10" ResizeAction="ReduceGalleryPreviewItems" />
        
<igRibbon:GroupVariant Priority="30" ResizeAction="ReduceImageAndTextLargeTools" />
        
<igRibbon:GroupVariant Priority="20" ResizeAction="ReduceImageAndTextNormalTools" />
        
<igRibbon:GroupVariant Priority="35" ResizeAction="ReduceHorizontalWrapRowCount" />
        
<igRibbon:GroupVariant Priority="40" ResizeAction="CollapseRibbonGroup" />
    
</igRibbon:RibbonGroup.Variants>
    
<!--GroupVariants-end-->
</igRibbon:RibbonGroup>    
参照