'Declaration Public Property AllowHiding As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean AllowHiding {get; set;}
True if the UltraToolbar can be hidden; otherwise, False.
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolbars Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click ' ---------------------------------------------------------------------------- ' Create 3 toolbars and add them to the UltraToolbarManager's toolbars collection. Me.UltraToolbarsManager1.Toolbars.AddToolbarRange(New String() {"MyToolbar3", "MyToolbar4", "MyToolbar5"}) ' ---------------------------------------------------------------------------- ' Create some button tools and add them to both 'MyToolbar3' and 'MyToolbar4'. Dim testButtonTool1 As New ButtonTool("TestButton1") Dim testButtonTool2 As New ButtonTool("TestButton2") Dim testButtonTool3 As New ButtonTool("TestButton3") Dim testButtonTool4 As New ButtonTool("TestButton4") ' Set some properties on the tools. testButtonTool1.SharedProps.Caption = "TestButton 1" testButtonTool1.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.Hand.Handle) testButtonTool2.SharedProps.Caption = "TestButton 2" testButtonTool2.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.Application.Handle) testButtonTool3.SharedProps.Caption = "TestButton 3" testButtonTool3.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.Question.Handle) testButtonTool4.SharedProps.Caption = "TestButton 4" testButtonTool4.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.WinLogo.Handle) ' Always add new tools to the UltraToolbarManager's root tools collection ' before adding them to menus or toolbars. Me.UltraToolbarsManager1.Tools.AddRange(New ToolBase() {testButtonTool1, testButtonTool2, testButtonTool3, testButtonTool4}) ' Add instances of the tools to the toolbars. Me.UltraToolbarsManager1.Toolbars("MyToolbar3").Tools.AddToolRange(New String() {"TestButton1", "TestButton2", "TestButton3", "TestButton4"}) Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Tools.AddToolRange(New String() {"TestButton1", "TestButton2", "TestButton3", "TestButton4"}) Me.UltraToolbarsManager1.Toolbars("MyToolbar5").Tools.AddToolRange(New String() {"TestButton1", "TestButton2", "TestButton3", "TestButton4"}) ' ---------------------------------------------------------------------------- ' Change some default settings for ALL toolbars by accessing the ToolbarSettings ' property on UltraToolbarsManager. Me.UltraToolbarsManager1.ToolbarSettings.AllowCustomize = DefaultableBoolean.True Me.UltraToolbarsManager1.ToolbarSettings.AllowDockBottom = DefaultableBoolean.True Me.UltraToolbarsManager1.ToolbarSettings.AllowDockLeft = DefaultableBoolean.False Me.UltraToolbarsManager1.ToolbarSettings.AllowDockRight = DefaultableBoolean.True Me.UltraToolbarsManager1.ToolbarSettings.AllowDockTop = DefaultableBoolean.False Me.UltraToolbarsManager1.ToolbarSettings.AllowFloating = DefaultableBoolean.False Me.UltraToolbarsManager1.ToolbarSettings.AllowHiding = DefaultableBoolean.False Me.UltraToolbarsManager1.ToolbarSettings.Appearance.BackColor = Color.Blue Me.UltraToolbarsManager1.ToolbarSettings.Appearance.ForeColor = Color.Cyan Me.UltraToolbarsManager1.ToolbarSettings.BorderStyleDocked = UIElementBorderStyle.Dotted Me.UltraToolbarsManager1.ToolbarSettings.CaptionPlacement = TextPlacement.BelowImage Me.UltraToolbarsManager1.ToolbarSettings.DockedAppearance.BackColor = Color.Silver Me.UltraToolbarsManager1.ToolbarSettings.EditAppearance.BackColor = Color.Red Me.UltraToolbarsManager1.ToolbarSettings.FillEntireRow = DefaultableBoolean.False Me.UltraToolbarsManager1.ToolbarSettings.FloatingAppearance.BackColor = Color.Blue Me.UltraToolbarsManager1.ToolbarSettings.GrabHandleStyle = GrabHandleStyle.Office2000 Me.UltraToolbarsManager1.ToolbarSettings.HotTrackAppearance.BackColor = Color.Red Me.UltraToolbarsManager1.ToolbarSettings.PaddingBottom = 3 Me.UltraToolbarsManager1.ToolbarSettings.PaddingLeft = 3 Me.UltraToolbarsManager1.ToolbarSettings.PaddingRight = 3 Me.UltraToolbarsManager1.ToolbarSettings.PaddingTop = 3 Me.UltraToolbarsManager1.ToolbarSettings.PressedAppearance.BackColor = Color.CadetBlue Me.UltraToolbarsManager1.ToolbarSettings.ToolAppearance.BackColor = Color.Transparent Me.UltraToolbarsManager1.ToolbarSettings.ToolDisplayStyle = ToolDisplayStyle.ImageAndText Me.UltraToolbarsManager1.ToolbarSettings.ToolSpacing = 3 ' ---------------------------------------------------------------------------- ' Override some of the settings for just 'MyToolbar4' by accessing the Settings ' property on the 'MyToolbar4'. This will only affect 'MyToolbar4'. Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Settings.Appearance.BackColor = Color.Red Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Settings.Appearance.ForeColor = Color.Pink Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Settings.AllowFloating = DefaultableBoolean.True Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Settings.ToolSpacing = 15 Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Settings.ToolAppearance.FontData.Bold = DefaultableBoolean.True Me.UltraToolbarsManager1.Toolbars("MyToolbar4").Settings.ToolAppearance.FontData.Italic = DefaultableBoolean.True End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinToolbars; private void button4_Click(object sender, System.EventArgs e) { // ---------------------------------------------------------------------------- // Create 3 toolbars and add them to the UltraToolbarManager's toolbars collection. this.ultraToolbarsManager1.Toolbars.AddToolbarRange(new string [] {"MyToolbar3", "MyToolbar4", "MyToolbar5"} ); // ---------------------------------------------------------------------------- // Create some button tools and add them to both 'MyToolbar3' and 'MyToolbar4'. ButtonTool testButtonTool1 = new ButtonTool("TestButton1"); ButtonTool testButtonTool2 = new ButtonTool("TestButton2"); ButtonTool testButtonTool3 = new ButtonTool("TestButton3"); ButtonTool testButtonTool4 = new ButtonTool("TestButton4"); // Set some properties on the tools. testButtonTool1.SharedProps.Caption = "TestButton 1"; testButtonTool1.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.Hand.Handle); testButtonTool2.SharedProps.Caption = "TestButton 2"; testButtonTool2.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.Application.Handle); testButtonTool3.SharedProps.Caption = "TestButton 3"; testButtonTool3.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.Question.Handle); testButtonTool4.SharedProps.Caption = "TestButton 4"; testButtonTool4.SharedProps.AppearancesSmall.Appearance.Image = Bitmap.FromHicon(SystemIcons.WinLogo.Handle); // Always add new tools to the UltraToolbarManager's root tools collection // before adding them to menus or toolbars. this.ultraToolbarsManager1.Tools.AddRange(new ToolBase [] {testButtonTool1, testButtonTool2, testButtonTool3, testButtonTool4} ); // Add instances of the tools to the toolbars. this.ultraToolbarsManager1.Toolbars["MyToolbar3"].Tools.AddToolRange( new string [] {"TestButton1", "TestButton2", "TestButton3", "TestButton4"} ); this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Tools.AddToolRange( new string [] {"TestButton1", "TestButton2", "TestButton3", "TestButton4"} ); this.ultraToolbarsManager1.Toolbars["MyToolbar5"].Tools.AddToolRange( new string [] {"TestButton1", "TestButton2", "TestButton3", "TestButton4"} ); // ---------------------------------------------------------------------------- // Change some default settings for ALL toolbars by accessing the ToolbarSettings // property on UltraToolbarsManager. this.ultraToolbarsManager1.ToolbarSettings.AllowCustomize = DefaultableBoolean.True; this.ultraToolbarsManager1.ToolbarSettings.AllowDockBottom = DefaultableBoolean.True; this.ultraToolbarsManager1.ToolbarSettings.AllowDockLeft = DefaultableBoolean.False; this.ultraToolbarsManager1.ToolbarSettings.AllowDockRight = DefaultableBoolean.True; this.ultraToolbarsManager1.ToolbarSettings.AllowDockTop = DefaultableBoolean.False; this.ultraToolbarsManager1.ToolbarSettings.AllowFloating = DefaultableBoolean.False; this.ultraToolbarsManager1.ToolbarSettings.AllowHiding = DefaultableBoolean.False; this.ultraToolbarsManager1.ToolbarSettings.Appearance.BackColor = Color.Blue; this.ultraToolbarsManager1.ToolbarSettings.Appearance.ForeColor = Color.Cyan; this.ultraToolbarsManager1.ToolbarSettings.BorderStyleDocked = UIElementBorderStyle.Dotted; this.ultraToolbarsManager1.ToolbarSettings.CaptionPlacement = TextPlacement.BelowImage; this.ultraToolbarsManager1.ToolbarSettings.DockedAppearance.BackColor = Color.Silver; this.ultraToolbarsManager1.ToolbarSettings.EditAppearance.BackColor = Color.Red; this.ultraToolbarsManager1.ToolbarSettings.FillEntireRow = DefaultableBoolean.False; this.ultraToolbarsManager1.ToolbarSettings.FloatingAppearance.BackColor = Color.Blue; this.ultraToolbarsManager1.ToolbarSettings.GrabHandleStyle = GrabHandleStyle.Office2000; this.ultraToolbarsManager1.ToolbarSettings.HotTrackAppearance.BackColor = Color.Red; this.ultraToolbarsManager1.ToolbarSettings.PaddingBottom = 3; this.ultraToolbarsManager1.ToolbarSettings.PaddingLeft = 3; this.ultraToolbarsManager1.ToolbarSettings.PaddingRight = 3; this.ultraToolbarsManager1.ToolbarSettings.PaddingTop = 3; this.ultraToolbarsManager1.ToolbarSettings.PressedAppearance.BackColor = Color.CadetBlue; this.ultraToolbarsManager1.ToolbarSettings.ToolAppearance.BackColor = Color.Transparent; this.ultraToolbarsManager1.ToolbarSettings.ToolDisplayStyle = ToolDisplayStyle.ImageAndText; this.ultraToolbarsManager1.ToolbarSettings.ToolSpacing = 3; // ---------------------------------------------------------------------------- // Override some of the settings for just 'MyToolbar4' by accessing the Settings // property on the 'MyToolbar4'. This will only affect 'MyToolbar4'. this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Settings.Appearance.BackColor = Color.Red; this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Settings.Appearance.ForeColor = Color.Pink; this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Settings.AllowFloating = DefaultableBoolean.True; this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Settings.ToolSpacing = 15; this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Settings.ToolAppearance.FontData.Bold = DefaultableBoolean.True; this.ultraToolbarsManager1.Toolbars["MyToolbar4"].Settings.ToolAppearance.FontData.Italic = DefaultableBoolean.True; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2