StylusDevice.Target Property


Gets the element that receives input.

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

public override IInputElement Target { get; }

Property Value

Type: System.Windows.IInputElement

The IInputElement object that receives input.

The following example demonstrates the Target property.

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

.NET Framework
Available since 3.0
Return to top