Version

OnMouseDown Method (PaneCaptionUIElement)

Invoked when a mouse button is pressed for the caption uielement.
Syntax
'Declaration
 
Protected Overrides Function OnMouseDown( _
   ByVal e As MouseEventArgs, _
   ByVal adjustableArea As Boolean, _
   ByRef captureMouseForElement As Infragistics.Win.UIElement _
) As Boolean
protected override bool OnMouseDown( 
   MouseEventArgs e,
   bool adjustableArea,
   ref Infragistics.Win.UIElement captureMouseForElement
)

Parameters

e
Mouse event arguments
adjustableArea
True if the mouse is over an adjustable area.
captureMouseForElement
By reference parameter used to indicate which element should capture the mouse.

Return Value

True to override the default processing
Example
This sample uses GetDescendant to get a child UIElement of the main control. Then hit-tests it.

Imports System.Windows.Forms
Imports Infragistics.Win
Imports System.Diagnostics

Private Sub ultraProgressBar1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles MyBase.MouseDown
   
    ' Hit test for ProgressFillTextUIElement
    Dim fillTextUIElement As UIElement
 	fillTextUIElement = Me.ultraProgressBar1.UIElement.GetDescendant( _
		GetType(UltraWinProgressBar.ProgressFillTextUIElement))
    

    If Not fillTextUIElement Is Nothing Then
	  If fillTextUIElement.Contains(new Point(e.X,e.Y))
            Debug.WriteLine("Hit ProgressFillTextUIElement")
      End If
 		End If

End Sub
using System.Windows.Forms;
	usingInfragistics.Win;
	usingSystem.Diagnostics;

private void ultraProgressBar1_MouseDown(object sender, MouseEventArgs e)
{

	// Hit test for ProgressFillTextUIElement

	UIElement fillTextUIElement = this.ultraProgressBar1.UIElement.GetDescendant(typeof(UltraWinProgressBar.ProgressFillTextUIElement));

	if(null != fillTextUIElement)
		if(fillTextUIElement.Contains(new Point(e.X,e.Y))
			Debug.WriteLine("Hit ProgressFillTextUIElement");

}
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