StylusPointDescription 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 StylusPointDescription 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| StylusPointDescription() |
初始化 StylusPointDescription 類別的新執行個體。 |
| StylusPointDescription(IEnumerable<StylusPointPropertyInfo>) |
初始化一個新的類別實例 StylusPointDescription ,並使用指定的 StylusPointPropertyInfo 物件。 |
StylusPointDescription()
初始化 StylusPointDescription 類別的新執行個體。
public:
StylusPointDescription();
public StylusPointDescription();
Public Sub New ()
範例
以下範例建立一個 StylusPointDescription 物件並利用它來建立一個 StylusPoint。
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)
備註
無參數建構子會產生 StylusPointDescription 包含屬性 X、 Y、 和 NormalPressure的資訊 。
適用於
StylusPointDescription(IEnumerable<StylusPointPropertyInfo>)
初始化一個新的類別實例 StylusPointDescription ,並使用指定的 StylusPointPropertyInfo 物件。
public:
StylusPointDescription(System::Collections::Generic::IEnumerable<System::Windows::Input::StylusPointPropertyInfo ^> ^ stylusPointPropertyInfos);
public StylusPointDescription(System.Collections.Generic.IEnumerable<System.Windows.Input.StylusPointPropertyInfo> stylusPointPropertyInfos);
new System.Windows.Input.StylusPointDescription : seq<System.Windows.Input.StylusPointPropertyInfo> -> System.Windows.Input.StylusPointDescription
Public Sub New (stylusPointPropertyInfos As IEnumerable(Of StylusPointPropertyInfo))
參數
- stylusPointPropertyInfos
- IEnumerable<StylusPointPropertyInfo>
一個類型的通用 IEnumerable StylusPointPropertyInfo ,指定 中的 StylusPointDescription屬性。
範例
以下範例建立一個 StylusPointDescription 物件並利用它來建立一個 StylusPoint。
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)
備註
你必須將 StylusPointPropertyInfo 物件傳遞為屬性 X、 Y、 和 NormalPressure。