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