バージョン

Visible プロパティ (UltraToolbar)

UltraToolbar が表示可能であるかどうかを示す値を取得または設定します。
シンタックス
'宣言
 
Public Property Visible As Boolean
public bool Visible {get; set;}

プロパティ値

ツールバーが表示可能である場合は True、そうでなければ False。
例外
例外解説
System.NotSupportedExceptionプロパティは、基本の Form または UserControl で定義された UltraToolbarsManager 内のツールバーに対してデザインタイムに修正されます。継承されたツールバーは、作成された Form または UserControl のデザイナーを通して、ランタイムまたはデザインタイムに修正される必要があります。
System.InvalidOperationException指定された値は False で、IsMainMenuBar は True です。
使用例
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars

	Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click

		Debug.WriteLine("Properties of all currently defined toolbars ------------------------")

		Debug.IndentLevel += 1

		Dim toolbar As UltraToolbar
		For Each toolbar In Me.UltraToolbarsManager1.Toolbars
			If toolbar Is Nothing Then
				GoTo NextToolbar
			End If

			Debug.WriteLine("Toolbar '" + toolbar.Key + "'")

			Debug.IndentLevel += 1

			' ツールバーの Settings および SettingsResolved プロパティをアクセスします
			Debug.WriteLine("Settings and SettingsResolved values for Toolbar '" + toolbar.Key + "'")

			Debug.IndentLevel = Debug.IndentLevel + 1

			Debug.WriteLine("AllowCustomize: " + toolbar.Settings.AllowCustomize.ToString() + "    AllowCustomizeResolved: " + toolbar.SettingsResolved.AllowCustomizeResolved.ToString())
			Debug.WriteLine("AllowDockTop: " + toolbar.Settings.AllowDockTop.ToString() + "    AllowDockTopResolved: " + toolbar.SettingsResolved.AllowDockTopResolved.ToString())
			Debug.WriteLine("AllowDockBottom: " + toolbar.Settings.AllowDockBottom.ToString() + "    AllowDockBottomResolved: " + toolbar.SettingsResolved.AllowDockBottomResolved.ToString())
			Debug.WriteLine("AllowDockLeft: " + toolbar.Settings.AllowDockLeft.ToString() + "    AllowDockLeftResolved: " + toolbar.SettingsResolved.AllowDockLeftResolved.ToString())
			Debug.WriteLine("AllowDockRight: " + toolbar.Settings.AllowDockRight.ToString() + "    AllowDockRightResolved: " + toolbar.SettingsResolved.AllowDockRightResolved.ToString())
			Debug.WriteLine("AllowFloating: " + toolbar.Settings.AllowFloating.ToString() + "    AllowFloatingResolved: " + toolbar.SettingsResolved.AllowFloatingResolved.ToString())
			Debug.WriteLine("AllowHiding: " + toolbar.Settings.AllowHiding.ToString() + "    AllowHidingResolved: " + toolbar.SettingsResolved.AllowHidingResolved.ToString())
			Debug.WriteLine("BorderStyleDocked: " + toolbar.Settings.BorderStyleDocked.ToString() + "    BorderStyleDockedResolved: " + toolbar.SettingsResolved.BorderStyleDockedResolved.ToString())
			Debug.WriteLine("CaptionPlacement: " + toolbar.Settings.CaptionPlacement.ToString() + "    CaptionPlacementResolved: " + toolbar.SettingsResolved.CaptionPlacementResolved.ToString())
			Debug.WriteLine("FillEntireRow: " + toolbar.Settings.FillEntireRow.ToString() + "    FillEntireRowResolved: " + toolbar.SettingsResolved.FillEntireRowResolved.ToString())
			Debug.WriteLine("GrabHandleStyle: " + toolbar.Settings.GrabHandleStyle.ToString() + "    GrabHandleStyleResolved: " + toolbar.SettingsResolved.GrabHandleStyleResolved.ToString())
			Debug.WriteLine("PaddingTop: " + toolbar.Settings.PaddingTop.ToString() + "    PaddingTopResolved: " + toolbar.SettingsResolved.PaddingTopResolved.ToString())
			Debug.WriteLine("PaddingBottom: " + toolbar.Settings.PaddingBottom.ToString() + "    PaddingBottomResolved: " + toolbar.SettingsResolved.PaddingBottomResolved.ToString())
			Debug.WriteLine("PaddingLeft: " + toolbar.Settings.PaddingLeft.ToString() + "    PaddingLeftResolved: " + toolbar.SettingsResolved.PaddingLeftResolved.ToString())
			Debug.WriteLine("PaddingRight: " + toolbar.Settings.PaddingRight.ToString() + "    PaddingRightResolved: " + toolbar.SettingsResolved.PaddingRightResolved.ToString())
			Debug.WriteLine("ToolSpacing: " + toolbar.Settings.ToolSpacing.ToString() + "    ToolSpacingResolved: " + toolbar.SettingsResolved.ToolSpacingResolved.ToString())

			If Not toolbar.TearawayToolOwner Is Nothing Then
				Debug.WriteLine("The toolbar's tearaway tool owner has a key of: '" + toolbar.TearawayToolOwner.Key + "'")
			Else
				Debug.WriteLine("The toolbar does not have a tearaway tool owner.")
			End If

			Debug.WriteLine("Text: " + toolbar.Text)
			Debug.WriteLine("Number of tools on this toolbar: " + toolbar.Tools.Count.ToString())

			If Not toolbar.UIElement Is Nothing Then
				Debug.WriteLine("The toolbar's UIElement rectangle is: " + toolbar.UIElement.Rect.ToString())
			Else
				Debug.WriteLine("The toolbar does not have a UIElement.")
			End If

			If Not toolbar.UnderlyingToolbar Is Nothing Then
				Debug.WriteLine("The toolbar has an underlying toolbar on an MDI form.")
			Else
				Debug.WriteLine("The toolbar does not have an underlying toolbar on an MDI form.")
			End If

			Debug.WriteLine("The toolbar's Visible property is set to: " + toolbar.Visible.ToString() + ", and its VisibleResolved property is set to: " + toolbar.VisibleResolved.ToString())

			Debug.IndentLevel -= 1
			Debug.IndentLevel -= 1

NextToolbar:
		Next

		Debug.IndentLevel -= 1

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinToolbars;

		private void button16_Click(object sender, System.EventArgs e)
		{

			Debug.WriteLine("Properties of all currently defined toolbars ------------------------");

			Debug.IndentLevel++;


			foreach(UltraToolbar toolbar in this.ultraToolbarsManager1.Toolbars)
			{
				if (toolbar == null)
					continue;

				Debug.WriteLine("Toolbar '" + toolbar.Key + "'");

				Debug.IndentLevel++;


				// ツールバーの Settings および SettingsResolved プロパティをアクセスします
				Debug.WriteLine("Settings and SettingsResolved values for Toolbar '" + toolbar.Key + "'"); 

				Debug.IndentLevel++;

				Debug.WriteLine("AllowCustomize: " + toolbar.Settings.AllowCustomize.ToString() + "    AllowCustomizeResolved: " + toolbar.SettingsResolved.AllowCustomizeResolved.ToString()); 
				Debug.WriteLine("AllowDockTop: " + toolbar.Settings.AllowDockTop.ToString() + "    AllowDockTopResolved: " + toolbar.SettingsResolved.AllowDockTopResolved.ToString()); 
				Debug.WriteLine("AllowDockBottom: " + toolbar.Settings.AllowDockBottom.ToString() + "    AllowDockBottomResolved: " + toolbar.SettingsResolved.AllowDockBottomResolved.ToString()); 
				Debug.WriteLine("AllowDockLeft: " + toolbar.Settings.AllowDockLeft.ToString() + "    AllowDockLeftResolved: " + toolbar.SettingsResolved.AllowDockLeftResolved.ToString()); 
				Debug.WriteLine("AllowDockRight: " + toolbar.Settings.AllowDockRight.ToString() + "    AllowDockRightResolved: " + toolbar.SettingsResolved.AllowDockRightResolved.ToString()); 
				Debug.WriteLine("AllowFloating: " + toolbar.Settings.AllowFloating.ToString() + "    AllowFloatingResolved: " + toolbar.SettingsResolved.AllowFloatingResolved.ToString()); 
				Debug.WriteLine("AllowHiding: " + toolbar.Settings.AllowHiding.ToString() + "    AllowHidingResolved: " + toolbar.SettingsResolved.AllowHidingResolved.ToString()); 
				Debug.WriteLine("BorderStyleDocked: " + toolbar.Settings.BorderStyleDocked.ToString() + "    BorderStyleDockedResolved: " + toolbar.SettingsResolved.BorderStyleDockedResolved.ToString()); 
				Debug.WriteLine("CaptionPlacement: " + toolbar.Settings.CaptionPlacement.ToString() + "    CaptionPlacementResolved: " + toolbar.SettingsResolved.CaptionPlacementResolved.ToString()); 
				Debug.WriteLine("FillEntireRow: " + toolbar.Settings.FillEntireRow.ToString() + "    FillEntireRowResolved: " + toolbar.SettingsResolved.FillEntireRowResolved.ToString()); 
				Debug.WriteLine("GrabHandleStyle: " + toolbar.Settings.GrabHandleStyle.ToString() + "    GrabHandleStyleResolved: " + toolbar.SettingsResolved.GrabHandleStyleResolved.ToString()); 
				Debug.WriteLine("PaddingTop: " + toolbar.Settings.PaddingTop.ToString() + "    PaddingTopResolved: " + toolbar.SettingsResolved.PaddingTopResolved.ToString()); 
				Debug.WriteLine("PaddingBottom: " + toolbar.Settings.PaddingBottom.ToString() + "    PaddingBottomResolved: " + toolbar.SettingsResolved.PaddingBottomResolved.ToString()); 
				Debug.WriteLine("PaddingLeft: " + toolbar.Settings.PaddingLeft.ToString() + "    PaddingLeftResolved: " + toolbar.SettingsResolved.PaddingLeftResolved.ToString()); 
				Debug.WriteLine("PaddingRight: " + toolbar.Settings.PaddingRight.ToString() + "    PaddingRightResolved: " + toolbar.SettingsResolved.PaddingRightResolved.ToString()); 
				Debug.WriteLine("ToolSpacing: " + toolbar.Settings.ToolSpacing.ToString() + "    ToolSpacingResolved: " + toolbar.SettingsResolved.ToolSpacingResolved.ToString()); 

				if (toolbar.TearawayToolOwner != null)
					Debug.WriteLine("The toolbar's tearaway tool owner has a key of: '" + toolbar.TearawayToolOwner.Key + "'"); 
				else
					Debug.WriteLine("The toolbar does not have a tearaway tool owner."); 

				Debug.WriteLine("Text: " + toolbar.Text); 
				Debug.WriteLine("Number of tools on this toolbar: " + toolbar.Tools.Count); 

				if (toolbar.UIElement != null)
					Debug.WriteLine("The toolbar's UIElement rectangle is: " + toolbar.UIElement.Rect.ToString()); 
				else
					Debug.WriteLine("The toolbar does not have a UIElement."); 

				if (toolbar.UnderlyingToolbar != toolbar)
					Debug.WriteLine("The toolbar has an underlying toolbar on an MDI form."); 
				else
					Debug.WriteLine("The toolbar does not have an underlying toolbar on an MDI form."); 

				Debug.WriteLine("The toolbar's Visible property is set to: " + toolbar.Visible.ToString() + ", and its VisibleResolved property is set to: " + toolbar.VisibleResolved.ToString()); 

				Debug.IndentLevel--;
			}

			Debug.IndentLevel--;

		}
参照