ArcGIS API for Silverlight - Library Reference
GetPosition Method
See Also  Send comments on this topic
ESRI.ArcGIS.Client Namespace > GraphicMouseEventArgs Class : GetPosition Method

relativeTo
Any System.Windows.UIElement-derived object that is contained by the Silverlight plug-in and connected to the object tree. To specify the object relative to the overall Silverlight coordinate system, use a relativeTo value of null.
Returns the x- and y-coordinates of the mouse pointer position, optionally evaluated against a coordinate origin of a supplied System.Windows.UIElement.

Syntax

Visual Basic (Declaration) 
Public Function GetPosition( _
   ByVal relativeTo As UIElement _
) As Point
C# 
public Point GetPosition( 
   UIElement relativeTo
)

Parameters

relativeTo
Any System.Windows.UIElement-derived object that is contained by the Silverlight plug-in and connected to the object tree. To specify the object relative to the overall Silverlight coordinate system, use a relativeTo value of null.

Return Value

A System.Windows.Point that represents the current x- and y-coordinates of the mouse pointer position. If null was passed as relativeTo, this coordinate is for the overall Silverlight plug-in content area. If a non-null relativeTo was passed, this coordinate is relative to the object referenced by relativeTo.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

See Also

© ESRI, Inc. All Rights Reserved.