Stylus.Captured Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the element to which the stylus is bound.
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
Property Value
The IInputElement to which the stylus is bound.
Examples
The following example demonstrates how to ensure that the stylus is not captured when the user touches the stylus to the digitizer. This example assumes that the PreviewStylusDown event is connected to the event handler.
void Window1_PreviewStylusDown(object sender, StylusEventArgs e)
{
IInputElement capturedElement = Stylus.Captured;
if (capturedElement != null)
{
capturedElement.ReleaseStylusCapture();
}
}
Private Sub Window1_PreviewStylusDown(ByVal sender As Object, ByVal e As StylusDownEventArgs) _
Handles Me.PreviewStylusDown
Dim capturedElement As IInputElement = Stylus.Captured
If Not (capturedElement Is Nothing) Then
capturedElement.ReleaseStylusCapture()
End If
End Sub
Applies to
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.