MouseDevice.GetPosition(IInputElement) 메서드

정의

지정한 요소를 기준으로 하는 마우스의 상대 위치를 가져옵니다.

public:
 System::Windows::Point GetPosition(System::Windows::IInputElement ^ relativeTo);
[System.Security.SecurityCritical]
public System.Windows.Point GetPosition (System.Windows.IInputElement relativeTo);
public System.Windows.Point GetPosition (System.Windows.IInputElement relativeTo);
[<System.Security.SecurityCritical>]
member this.GetPosition : System.Windows.IInputElement -> System.Windows.Point
member this.GetPosition : System.Windows.IInputElement -> System.Windows.Point
Public Function GetPosition (relativeTo As IInputElement) As Point

매개 변수

relativeTo
IInputElement

마우스 위치를 계산할 참조 프레임입니다.

반환

relativeTo 매개 변수를 기준으로 하는 마우스의 상대 위치입니다.

특성

예외

relativeTonull이거나 UIElementContentElement가 아닌 경우

설명

마우스 포인터의 위치는 요소의 왼쪽 위 모서리가 원점인 0,0인 지정된 IInputElement 을 기준으로 계산됩니다.

적용 대상