StylusPoint.HasProperty(StylusPointProperty) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回当前 StylusPoint 是否包含指定的属性。
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
参数
- stylusPointProperty
- StylusPointProperty
要 StylusPointProperty 签入的 StylusPoint。
返回
示例
以下示例在获取属性的值之前检查触笔点属性是否存在。 此示例假定有一个 StylusPoint 调用 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
注解
若要检查StylusPoint包含指定属性,请在调用方法或HasProperty方法之前调用GetPropertyValueSetPropertyValue。