StylusPoint.SetPropertyValue Method (StylusPointProperty, Int32)

 

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.

Exception Condition
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
Available since 3.0
Return to top
Show: