Specified the position relative to another
UltraExplorerBarItem, to which an
UltraExplorerBarItem should be moved.
The following code repositions Items between Groups and Within a Group.
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar
Private Sub Button46_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button46.Click
' Move the first item in the first group to the second group.
If (Me.ultraExplorerBar1.Groups.Count > 1 AndAlso Me.ultraExplorerBar1.Groups(0).Items.Count > 0) Then
Me.ultraExplorerBar1.Groups(0).Items(0).Reposition(Me.ultraExplorerBar1.Groups(1))
End If
' Move the first item in the second group after the second item in the second group.
If (Me.ultraExplorerBar1.Groups.Count > 1 AndAlso Me.ultraExplorerBar1.Groups(1).Items.Count > 1) Then
Me.ultraExplorerBar1.Groups(1).Items(0).Reposition(Me.ultraExplorerBar1.Groups(1).Items(1), ItemPosition.Next)
End If
End Sub
'Declaration
Public Enum ItemPosition
Inherits System.Enum
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;
private void button46_Click(object sender, System.EventArgs e)
{
// Move the first item in the first group to the second group.
if (this.ultraExplorerBar1.Groups.Count > 1 &&
this.ultraExplorerBar1.Groups[0].Items.Count > 0)
{
this.ultraExplorerBar1.Groups[0].Items[0].Reposition(this.ultraExplorerBar1.Groups[1]);
}
// Move the first item in the second group after the second item in the second group.
if (this.ultraExplorerBar1.Groups.Count > 1 &&
this.ultraExplorerBar1.Groups[1].Items.Count > 1)
{
this.ultraExplorerBar1.Groups[1].Items[0].Reposition(this.ultraExplorerBar1.Groups[1].Items[1], ItemPosition.Next);
}
}
'Declaration
Public Enum ItemPosition
Inherits System.Enum
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