Version

UIElement Property (UltraExplorerBarItem)

Returns the UIElement for the UltraExplorerBarItem.
Syntax
'Declaration
 
Public ReadOnly Property UIElement As ItemUIElementBase
public ItemUIElementBase UIElement {get;}
Example
The following code displays information about the size, location and number of child elements for each Item UIElement in the first Group.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar

	Private Sub Button41_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button41.Click

		' For each item in the first group, display the size, and location of its UIElement.
		' Also display the number of child elements in the item's UIElement.
		If (Me.ultraExplorerBar1.Groups.Count < 1) Then
			Return
		End If

		Dim item As UltraExplorerBarItem
		For Each item In Me.ultraExplorerBar1.Groups(0).Items
			Dim messageText As String = "The size of the UIElement for Item '{0}' is {1} and its location is {2}.  It contains {3} element(s)"

			Dim messageTextFormatted As String = String.Format(messageText, _
			   item.Text, _
			   item.UIElement.Rect.Size.ToString(), _
			   item.UIElement.Rect.Location.ToString(), _
			   item.UIElement.ChildElements.Count)

			Debug.WriteLine(messageTextFormatted)
		Next

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


		private void button41_Click(object sender, System.EventArgs e)
		{
			// For each item in the first group, display the size, and location of its UIElement.
			// Also display the number of child elements in the item's UIElement.
			if (this.ultraExplorerBar1.Groups.Count < 1)
				return;

			foreach(UltraExplorerBarItem item in this.ultraExplorerBar1.Groups[0].Items)
			{
				string messageText			= "The size of the UIElement for Item '{0}' is {1} and its location is {2}.  It contains {3} element(s)";
				string messageTextFormatted = string.Format(messageText,
															item.Text,
															item.UIElement.Rect.Size.ToString(),
															item.UIElement.Rect.Location.ToString(),
															item.UIElement.ChildElements.Count);

				Debug.WriteLine(messageTextFormatted);
			}
		}
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