StylusPoint::PressureFactor Property

Gets or sets a value between 0 and 1 that reflects the amount of pressure the stylus applies to the digitizer's surface when the StylusPoint is created.

Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
property float PressureFactor {
	float get ();
	void set (float value);
}
<object PressureFactor="float" .../>

Property Value

Type: System::Single
Value between 0 and 1 indicating the amount of pressure the stylus applies to the digitizer's surface as the StylusPoint is created.

ExceptionCondition
ArgumentOutOfRangeException

The PressureFactor property is set to a value less than 0 or greater than 1.

The value of the PressureFactor property is expressed as a value between 0 and 1. A value of 0 indicates that no pressure is applied, while a value of 1 indicates that the maximum amount of pressure is applied. A value of 0.5 indicates that 50% of the maximum pressure is applied, and so on.

The following example uses the PressureFactor property to retrieve and display the pressure value for each StylusPoint in a StylusPointCollection called points. This example assumes that there is a TextBlock called packetOutput.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft