'宣言 Public ReadOnly Property TabItemToolbar As RibbonTabItemToolbar
public RibbonTabItemToolbar TabItemToolbar {get;}
Imports Infragistics.Win.UltraWinToolbars Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Create a help button at add the root tool to the toolbars manager's ' tools collection Dim helpRootTool As ButtonTool = New ButtonTool("Help") helpRootTool.SharedProps.Caption = "Help" helpRootTool.SharedProps.DisplayStyle = ToolDisplayStyle.ImageAndText Me.UltraToolbarsManager1.Tools.Add(helpRootTool) ' Add an instance of the help button the the ribbon tab item toolbar Me.UltraToolbarsManager1.Ribbon.TabItemToolbar.Tools.AddTool("Help") End Sub
using System.Windows.Forms; using Infragistics.Win.UltraWinToolbars; private void Form1_Load( object sender, EventArgs e ) { // Create a help button at add the root tool to the toolbars manager's // tools collection ButtonTool helpRootTool = new ButtonTool( "Help" ); helpRootTool.SharedProps.Caption = "Help"; helpRootTool.SharedProps.DisplayStyle = ToolDisplayStyle.ImageAndText; this.ultraToolbarsManager1.Tools.Add( helpRootTool ); // Add an instance of the help button the the ribbon tab item toolbar this.ultraToolbarsManager1.Ribbon.TabItemToolbar.Tools.AddTool( "Help" ); }