Upraviť

Zdieľať cez


StylusPoint.HasProperty(StylusPointProperty) Method

Definition

Returns whether the current StylusPoint contains the specified property.

public:
 bool HasProperty(System::Windows::Input::StylusPointProperty ^ stylusPointProperty);
public bool HasProperty (System.Windows.Input.StylusPointProperty stylusPointProperty);
member this.HasProperty : System.Windows.Input.StylusPointProperty -> bool
Public Function HasProperty (stylusPointProperty As StylusPointProperty) As Boolean

Parameters

stylusPointProperty
StylusPointProperty

The StylusPointProperty to check for in the StylusPoint.

Returns

true if the specified StylusPointProperty is in the current StylusPoint; otherwise, false.

Examples

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

if (point.HasProperty(StylusPointProperties.PitchRotation))
{
    int pitchRotation = point.GetPropertyValue(StylusPointProperties.PitchRotation);
}
If point.HasProperty(StylusPointProperties.PitchRotation) Then
    Dim pitchRotation As Integer = _
            point.GetPropertyValue(StylusPointProperties.PitchRotation)
End If

Remarks

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

Applies to