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

member PressureFactor : float32 with get, set
<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.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft