Version

DockedColumn Property

Gets or sets the logical column in which the UltraToolbar is docked.
Syntax
'Declaration
 
Public Property DockedColumn As Integer
public int DockedColumn {get; set;}

Property Value

The logical column in which the UltraToolbar is docked.
Exceptions
ExceptionDescription
System.NotSupportedExceptionThe property is modified at design-time for a toolbar in an UltraToolbarsManager defined on a base Form or UserControl. Inherited toolbars must be modified at run-time or at design-time through the designer of the Form or UserControl they were created on.
Remarks

The DockedColumn determines the position of the toolbar relative to others in the same logical row, or DockedRow. The DockedColumns are always numbered with the top-left most toolbar at 0. Each toolbar in the same row moving towards the left or bottom has a DockedColumn of one more. For example, if three toolbars are docked on the same row at the top of a Form, the DockedColumn of the left toolbar is 0, the middle toolbar is 1, and the right toolbar is 2. Similarly, if the three toolbars are docked to the right side of the Form in the same row (the docked rows run vertically for toolbars docked on the left or right), the toolbar at the top has a DockedColumn of 0 while the toolbar at the bottom of the row has a DockedColumn of 2.

The DockedColumn and DockedRow will only be used to position the toolbar when the DockedPosition is not Floating.

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 DockedColumn, DockedRow, DockedPosition, FloatingLocation and FloatingSize
			' properties of a toolbar.
			Select Case toolbar.DockedPosition
				Case DockedPosition.Floating
					Dim rectFloating As New Rectangle(toolbar.FloatingLocation, toolbar.FloatingSize)

					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is floating.  Its position and size are: " + rectFloating.ToString())

				Case DockedPosition.Top
				Case DockedPosition.Bottom
				Case DockedPosition.Left
				Case DockedPosition.Right
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is docked in position '" + toolbar.DockedPosition.ToString() + "'.  Its DockedRow is: " + toolbar.DockedRow.ToString() + ", and its DockedColumn is: " + toolbar.DockedColumn.ToString())
			End Select

			' Access the Index property of a toolbar.
			Debug.WriteLine("Toolbar '" + toolbar.Key + "' has an Index in its parent collection of: " + toolbar.Index.ToString())


			' Access the IsMainMenuBar property of a toolbar.
			If toolbar.IsMainMenuBar = True Then
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' is a main menu bar!")
			Else
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' is NOT a main menu bar!")
			End If


			' Access the IsStockToolbar property of a toolbar.
			If toolbar.IsStockToolbar = True Then
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' is a stock toolbar!")
			Else
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' is NOT a stock toolbar!")
			End If


			' Access the ParentCollection property of a toolbar.
			If Not toolbar.ParentCollection Is Nothing Then
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' is in a collection that contains a total of " + toolbar.ParentCollection.Count.ToString() + " entries")
			End If


			' Access the ShowInToolbarList property of a toolbar.
			If toolbar.ShowInToolbarList = True Then
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' will appear in the toolbar list")
			Else
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' will NOT appear in the toolbar list!")
			End If

			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 DockedColumn, DockedRow, DockedPosition, FloatingLocation and FloatingSize
				// properties of a toolbar.
				switch (toolbar.DockedPosition)
				{
					case DockedPosition.Floating:
						Rectangle rectFloating = new Rectangle(toolbar.FloatingLocation, toolbar.FloatingSize);

						Debug.WriteLine("Toolbar '" + toolbar.Key + "' is floating.  Its position and size are: " + rectFloating.ToString()); 
						break;

					case DockedPosition.Top:
					case DockedPosition.Bottom:
					case DockedPosition.Left:
					case DockedPosition.Right:
						Debug.WriteLine("Toolbar '" + toolbar.Key + "' is docked in position '" + toolbar.DockedPosition.ToString() + "'.  Its DockedRow is: " + toolbar.DockedRow.ToString() + ", and its DockedColumn is: " + toolbar.DockedColumn.ToString()); 
						break;
				}


				// Access the Index property of a toolbar.
				Debug.WriteLine("Toolbar '" + toolbar.Key + "' has an Index in its parent collection of: " + toolbar.Index.ToString()); 


				// Access the IsMainMenuBar property of a toolbar.
				if (toolbar.IsMainMenuBar == true)
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is a main menu bar!"); 
				else
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is NOT a main menu bar!"); 


				// Access the IsStockToolbar property of a toolbar.
				if (toolbar.IsStockToolbar == true)
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is a stock toolbar!"); 
				else
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is NOT a stock toolbar!"); 


				// Access the ParentCollection property of a toolbar.
				if (toolbar.ParentCollection != null)
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' is in a collection that contains a total of " + toolbar.ParentCollection.Count.ToString() + " entries"); 


				// Access the ShowInToolbarList property of a toolbar.
				if (toolbar.ShowInToolbarList == true)
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' will appear in the toolbar list"); 
				else
					Debug.WriteLine("Toolbar '" + toolbar.Key + "' will NOT appear in the toolbar list!"); 

				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