Export (0) Print
Expand All

StylusPoint.SetPropertyValue Method

Sets the specified property to the specified value.

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

public void SetPropertyValue(
	StylusPointProperty stylusPointProperty,
	int value
)

Parameters

stylusPointProperty
Type: System.Windows.Input.StylusPointProperty

The StylusPointProperty that specifies which property value to set.

value
Type: System.Int32

The value of the property.

ExceptionCondition
ArgumentException

stylusPointProperty is not one of the properties in Description.

To check whether the StylusPoint contains the specified property, call the HasProperty before calling either the GetPropertyValue method or the SetPropertyValue method.

The following example checks for the existence of a stylus point property before setting the property's value. This example assumes that there is a StylusPoint called point.

if (point.HasProperty(StylusPointProperties.PitchRotation))
{
    point.SetPropertyValue(StylusPointProperties.PitchRotation, 1000);
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft