'宣言 Public ReadOnly Property Groups As RibbonGroupCollection
public RibbonGroupCollection Groups {get;}
Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolBars ' Add a RibbonTab Dim ribbonTab As RibbonTab = Me.UltraToolbarsManager1.Ribbon.Tabs.Add("Ribbon Tab Key") ' Set the caption ribbonTab.Caption = "Ribbon Tab Caption" ' Add a Contextual Tab Group if it doesn't already exist. If (Me.UltraToolbarsManager1.Ribbon.ContextualTabGroups.Exists("contextualTabGroup1") = False) Then Me.UltraToolbarsManager1.Ribbon.ContextualTabGroups.Add("contextualTabGroup1") End If ' Put the new RibbonGroup into the Contextual Tab Group ribbonTab.ContextualTabGroupKey = "contextualTabGroup1" ' Set the KeyTip ribbonTab.KeyTip = "R" ' Make the new RibbonTab visible. ribbonTab.Visible = True ' Add some groups. ribbonTab.Groups.Add("Clipboard") ribbonTab.Groups.Add("Font") ribbonTab.Groups.Add("Styles")
using Infragistics.Win; using Infragistics.Win.UltraWinToolBars; // Add a RibbonTab RibbonTab ribbonTab = this.ultraToolbarsManager1.Ribbon.Tabs.Add("Ribbon Tab Key"); // Set the caption ribbonTab.Caption = "Ribbon Tab Caption"; // Add a Contextual Tab Group if it doesn't already exist. if (this.ultraToolbarsManager1.Ribbon.ContextualTabGroups.Exists("contextualTabGroup1") == false) this.ultraToolbarsManager1.Ribbon.ContextualTabGroups.Add("contextualTabGroup1"); // Put the new RibbonGroup into the Contextual Tab Group ribbonTab.ContextualTabGroupKey = "contextualTabGroup1"; // Set the KeyTip ribbonTab.KeyTip = "R"; // Make the new RibbonTab visible. ribbonTab.Visible = true; // Add some groups. ribbonTab.Groups.Add("Clipboard"); ribbonTab.Groups.Add("Font"); ribbonTab.Groups.Add("Styles");