Mouse.Captured 속성

정의

마우스를 캡처한 요소를 가져옵니다.

public:
 static property System::Windows::IInputElement ^ Captured { System::Windows::IInputElement ^ get(); };
public static System.Windows.IInputElement Captured { get; }
static member Captured : System.Windows.IInputElement
Public Shared ReadOnly Property Captured As IInputElement

속성 값

마우스에서 캡처한 요소입니다.

예제

다음 예제에서는 마우스 캡처가 있는 요소를 가져오는 방법을 보여줍니다.

// Mouse.Capture returns an IInputElement.
IInputElement captureElement;

captureElement = Mouse.Captured;

// Update the Label that displays the element with mouse capture.
lblHasMouseCapture.Content = captureElement.ToString();
' Mouse.Capture returns an IInputElement.
Dim captureElement As IInputElement

captureElement = Mouse.Captured

' Update the Label that displays the element with mouse capture.
lblHasMouseCapture.Content = CType(captureElement, Object).ToString()

설명

요소가 마우스를 캡처하면 커서가 테두리 내에 있는지 여부에 관계없이 마우스 입력을 받습니다. 마우스는 일반적으로 끌어서 놓기 작업 중에만 이러한 방식으로 캡처되며 끌어서 놓기 작업의 놓기 동작이 발생할 때까지 캡처를 유지합니다.

적용 대상