Version

UIElement Property (UltraScrollBar)

Returns the UltraScrollBarControlUIElement which occupies the client area of the control.
Syntax
'Declaration
 
Public ReadOnly Property UIElement As UltraScrollBarControlUIElement
public UltraScrollBarControlUIElement UIElement {get;}
Example
The following sample code illustrates how to find out what UIElement the mouse is over.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinScrollBar

Private Sub ultraScrollBar1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ultraScrollBar1.MouseDown

    Dim mainElement As UIElement
    Dim element As UIElement

    ' Get the control's main element
    mainElement = Me.ultraScrollBar1.UIElement

    ' Get the element at that point
    element = mainElement.ElementFromPoint(New Point(e.X, e.Y))

    If element Is Nothing Then Return

    Debug.WriteLine("Mouse down on an " + element.GetType().ToString())
    Debug.Indent()

    ' Walk up the parent element chain and write out a line 
    ' for each parent element.
    While Not element.Parent Is Nothing

        element = element.Parent
        Debug.WriteLine("is a child of an " + element.GetType().ToString())
        Debug.Indent()

    End While

    ' Reset the indent level
    Debug.IndentLevel = 0

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

private void ultraScrollBar1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{

	UIElement mainElement;
	UIElement element;

	// Get the control's main element
	mainElement = this.ultraScrollBar1.UIElement;
 
	// Get the element at that point
	element = mainElement.ElementFromPoint( new Point( e.X, e.Y ) );

	if ( element == null )
		return;

	Debug.WriteLine( "Mouse down on an " + element.GetType().ToString() );
	Debug.Indent();

	// Walk up the parent element chain and write out a line 
	// for each parent element.
	while (element.Parent != null )
	{
		element = element.Parent;
		Debug.WriteLine("is a child of an " + element.GetType().ToString());
		Debug.Indent();
	}

	// Reset the indent level
	Debug.IndentLevel = 0;

}
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