Version

Reposition(DockedPosition,Int32) Method

Repositions the UltraToolbar to the specified dock area and dock row, ensuring that it is the only toolbar on the dock row.
Syntax
'Declaration
 
Public Overloads Sub Reposition( _
   ByVal newDockPosition As DockedPosition, _
   ByVal newDockedRow As Integer _
) 
public void Reposition( 
   DockedPosition newDockPosition,
   int newDockedRow
)

Parameters

newDockPosition
The new position to assign to the toolbar.
newDockedRow
The new docked row to assign to the toolbar.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionnewDockPosition is not defined in the DockedPosition enumeration.
Example
The following code demonstrates how to use the Reposition method of the UltraToolbar object to change a toolbar's position.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

	Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click

		' Iterate thru the toolbars collection and reposition each toolbar.  Move the toolbars
		' between dock areas in a clockwise fashion - Top, Right, Bottom, Left, Floating.
		Dim toolbar As UltraToolbar
		For Each toolbar In Me.UltraToolbarsManager1.Toolbars
			Select Case toolbar.DockedPosition
				Case DockedPosition.Top
					toolbar.Reposition(DockedPosition.Right, 0)

				Case DockedPosition.Right
					toolbar.Reposition(DockedPosition.Bottom, 0)

				Case DockedPosition.Bottom
					toolbar.Reposition(DockedPosition.Left, 0)

				Case DockedPosition.Left
					toolbar.Reposition(DockedPosition.Floating, 0)

				Case DockedPosition.Floating
					toolbar.Reposition(DockedPosition.Top, 0)
			End Select
		Next

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

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

			// Iterate thru the toolbars collection and reposition each toolbar.  Move the toolbars
			// between dock areas in a clockwise fashion - Top, Right, Bottom, Left, Floating.
			foreach(UltraToolbar toolbar in this.ultraToolbarsManager1.Toolbars)
			{
				switch(toolbar.DockedPosition)
				{
					case DockedPosition.Top:
						toolbar.Reposition(DockedPosition.Right, 0);
						break;

					case DockedPosition.Right:
						toolbar.Reposition(DockedPosition.Bottom, 0);
						break;

					case DockedPosition.Bottom:
						toolbar.Reposition(DockedPosition.Left, 0);
						break;

					case DockedPosition.Left:
						toolbar.Reposition(DockedPosition.Floating, 0);
						break;

					case DockedPosition.Floating:
						toolbar.Reposition(DockedPosition.Top, 0);
						break;
				}
			}

		}
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