Version

UnderlyingToolbar Property (UltraToolbar)

Gets the MDI child toolbar that underlies this toolbar.
Syntax
'Declaration
 
Public Overrides ReadOnly Property UnderlyingToolbar As UltraToolbar
public override UltraToolbar UnderlyingToolbar {get;}

Property Value

The MDI child toolbar that underlies this toolbar.
Remarks

When an MDI merge occurs, a toolbar from the child will be merged into a toolbar on the parent if they have the same key or both have IsMainMenuBar set to True. In this case, the toolbar on the parent will return the toolbar on the child from its UnderlyingToolbar property.

Example
The following code shows how to access various toolbar properties.

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

			' Access the Settings and SettingsResolved properties of a toolbar.
			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++;


				// Access the Settings and SettingsResolved properties of a toolbar.
				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--;

		}
Requirements

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

See Also