'Declaration Public ReadOnly Property UIElement As UltraTextEditorUIElement
public UltraTextEditorUIElement UIElement {get;}
The UIElement property returns a reference to the UIElement that represents the control itself. All the UI aspects of the control are implemented as UIElements which are children of the control's UIElement (available only at runtime).
Imports Infragistics.Win Imports Infragistics.Win.UltraWinEditors Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cursorIsOverImage As Boolean = Me.IsPointOverImage(New Point(10, 10)) End Sub Private Function IsPointOverImage(ByVal point As Point) As Boolean ' Use the control's UIElement property to get a reference to ' the UIElement that represents the control itself Dim mainElement As UIElement = Me.UltraTextEditor1.UIElement ' Try to locate an ImageUIElement if we can't, return false Dim imageUIElement As ImageUIElement = mainElement.GetDescendant(GetType(ImageUIElement)) If (imageUIElement Is Nothing) Then Return False ' If the specified point is within the bounds of the ' ImageUIElement, return true If (imageUIElement.PointInElement(point)) Then Return True Return False End Function
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinEditors; private void button1_Click(object sender, System.EventArgs e) { bool cursorIsOverImage = this.IsPointOverImage( new Point(10,10) ); } private bool IsPointOverImage( Point point ) { // Use the control's UIElement property to get a reference to // the UIElement that represents the control itself UIElement mainElement = this.ultraTextEditor1.UIElement; // Try to locate an ImageUIElement; if we can't, return false ImageUIElement imageUIElement = mainElement.GetDescendant( typeof(ImageUIElement) ) as ImageUIElement; if ( imageUIElement == null ) return false; // If the specified point is within the bounds of the // ImageUIElement, return true if ( imageUIElement.PointInElement( point ) ) return true; return false; }
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