Export (0) Print
Expand All

StylusPoint.HasProperty Method

Returns whether the current StylusPoint contains the specified property.

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

public bool HasProperty(
	StylusPointProperty stylusPointProperty
)

Parameters

stylusPointProperty
Type: System.Windows.Input.StylusPointProperty

The StylusPointProperty to check for in the StylusPoint.

Return Value

Type: System.Boolean
true if the specified StylusPointProperty is in the current StylusPoint; otherwise, false.

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 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);
}

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft