StylusPointDescription.IsSubsetOf(StylusPointDescription) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示当前 StylusPointDescription 是否为指定 StylusPointDescription 的子集。
public:
bool IsSubsetOf(System::Windows::Input::StylusPointDescription ^ stylusPointDescriptionSuperset);
public bool IsSubsetOf (System.Windows.Input.StylusPointDescription stylusPointDescriptionSuperset);
member this.IsSubsetOf : System.Windows.Input.StylusPointDescription -> bool
Public Function IsSubsetOf (stylusPointDescriptionSuperset As StylusPointDescription) As Boolean
参数
- stylusPointDescriptionSuperset
- StylusPointDescription
要根据其检查当前 StylusPointDescription 是否为子集的 StylusPointDescription。
返回
如果当前 StylusPointDescription 是指定 StylusPointDescription 的子集,则为 true
;否则为 false
。
示例
以下示例检查 是否 description2
是 的 description1
子集。
StylusPointDescription description1 =
new StylusPointDescription(new StylusPointPropertyInfo[]
{
new StylusPointPropertyInfo(StylusPointProperties.X),
new StylusPointPropertyInfo(StylusPointProperties.Y),
new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
new StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation),
new StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation),
new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
});
StylusPointDescription description2 =
new StylusPointDescription(new StylusPointPropertyInfo[]
{
new StylusPointPropertyInfo(StylusPointProperties.X),
new StylusPointPropertyInfo(StylusPointProperties.Y),
new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
});
Dim description1 As New StylusPointDescription( _
New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _
New StylusPointPropertyInfo(StylusPointProperties.Y), _
New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _
New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _
New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})
Dim description2 As New StylusPointDescription( _
New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _
New StylusPointPropertyInfo(StylusPointProperties.Y), _
New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})
if (description2.IsSubsetOf(description1))
{
MessageBox.Show("description2 is a subset of description1.");
}
else
{
MessageBox.Show("description2 is not a subset of description1.");
}
If description2.IsSubsetOf(description1) Then
MessageBox.Show("description2 is a subset of description1.")
Else
MessageBox.Show("description2 is not a subset of description1.")
End If