StylusPoint.SetPropertyValue(StylusPointProperty, Int32) Method

Definition

Sets the specified property to the specified value.Sets the specified property to the specified value.

public:
 void SetPropertyValue(System::Windows::Input::StylusPointProperty ^ stylusPointProperty, int value);
public void SetPropertyValue (System.Windows.Input.StylusPointProperty stylusPointProperty, int value);
member this.SetPropertyValue : System.Windows.Input.StylusPointProperty * int -> unit
Public Sub SetPropertyValue (stylusPointProperty As StylusPointProperty, value As Integer)

Parameters

stylusPointProperty
StylusPointProperty

The StylusPointProperty that specifies which property value to set.The StylusPointProperty that specifies which property value to set.

value
Int32

The value of the property.The value of the property.

Exceptions

stylusPointProperty is not one of the properties in Description.stylusPointProperty is not one of the properties in Description.

Examples

В следующем примере проверяется наличие свойства точки пера перед установкой значения свойства.The following example checks for the existence of a stylus point property before setting the property's value. В этом примере предполагается, что имеется StylusPoint с именем point.This example assumes that there is a StylusPoint called point.

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

Remarks

Чтобы проверить, содержит ли StylusPoint указанное свойство, вызовите HasProperty перед вызовом метода GetPropertyValue или метода SetPropertyValue.To check whether the StylusPoint contains the specified property, call the HasProperty before calling either the GetPropertyValue method or the SetPropertyValue method.

Applies to