StylusDevice.Captured Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the element that captured the stylus.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public IInputElement Captured { get; }

Property Value

Type: System.Windows.IInputElement

The IInputElement that captured the stylus.

The following example demonstrates the Captured property.

// See to what Captured property is set
// First see if it's null
if (null == myStylusDevice.Captured)
    textbox1.AppendText("Captured: null\n");
    // Otherwise display the underlying type
    textbox1.AppendText("Captured: " + myStylusDevice.Captured.GetType().Name + "\n");

.NET Framework
Available since 3.0
Return to top