StylusDevice.ActiveSource Property

 
System_CAPS_noteNote

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

Gets the PresentationSource that reports current input for the stylus.

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

public override PresentationSource ActiveSource {
	[SecurityCriticalAttribute]
	[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.AllWindows)]
	get;
}

Property Value

Type: System.Windows.PresentationSource

The PresentationSource that reports current input for the stylus.

The following example demonstrates the ActiveSource property.

PresentationSource myPresentationSource = myStylusDevice.ActiveSource;

if (null == myPresentationSource)
{
    textbox1.AppendText("ActiveSource : null\n");
}
else
{
    textbox1.AppendText("ActiveSource :" + myPresentationSource.ToString() + "\n");
}

UIPermission

for applications to read this property. Associated enumeration: UIPermissionWindow.AllWindows

.NET Framework
Available since 3.0
Return to top
Show: