RealTimeStylus.GetTabletPropertyDescriptionCollection 方法
傳回與指定之手寫板內容識別項相關聯的 TabletPropertyDescriptionCollection 集合。
命名空間: Microsoft.StylusInput
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
Public Function GetTabletPropertyDescriptionCollection ( _
tabletContextId As Integer _
) As TabletPropertyDescriptionCollection
'用途
Dim instance As RealTimeStylus
Dim tabletContextId As Integer
Dim returnValue As TabletPropertyDescriptionCollection
returnValue = instance.GetTabletPropertyDescriptionCollection(tabletContextId)
public TabletPropertyDescriptionCollection GetTabletPropertyDescriptionCollection(
int tabletContextId
)
public:
TabletPropertyDescriptionCollection^ GetTabletPropertyDescriptionCollection(
int tabletContextId
)
public TabletPropertyDescriptionCollection GetTabletPropertyDescriptionCollection(
int tabletContextId
)
public function GetTabletPropertyDescriptionCollection(
tabletContextId : int
) : TabletPropertyDescriptionCollection
參數
- tabletContextId
型別:System.Int32
所需封包屬性描述之 Tablet 物件的手寫板內容識別項。
傳回值
型別:Microsoft.Ink.TabletPropertyDescriptionCollection
與指定之手寫板內容識別項相關聯的 TabletPropertyDescriptionCollection 集合。
備註
這個方法會在已停用或處置 RealTimeStylus 時擲回例外狀況。
範例
這個 C# 範例程式碼片段是 IStylusAsyncPlugin 介面之 TabletAdded 方法的實作。實作 IStylusAsyncPlugin 介面的表單包含 TextBox (英文) 物件 theTextBox。TabletAdded 方法會顯示所加入手寫板的相關資訊,呼叫 GetTabletContextIdFromTablet 方法以取得手寫板內容識別項,並且呼叫 GetTabletPropertyDescriptionCollection 方法以取得手寫板支援的封包屬性清單。
using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;
// ...
// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;
// ...
// Called when a tablet is added while the RealTimeStylus is enabled.
public void TabletAdded(RealTimeStylus sender, TabletAddedData data)
{
// Display information about the tablet that was added.
int theContextId =
this.thePrimaryRealTimeStylus.GetTabletContextIdFromTablet(data.Tablet);
this.theTextBox.Text = string.Format(
"Tablet added, Name = {0}, ContextId={1}, available packet properties:"
+ Environment.NewLine, data.Tablet.Name, theContextId);
TabletPropertyDescriptionCollection theTabletProperties =
this.thePrimaryRealTimeStylus.GetTabletPropertyDescriptionCollection(theContextId);
foreach(TabletPropertyDescription theTabletPropertyDescription in theTabletProperties)
{
// ...
}
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
Microsoft.Ink.TabletPropertyDescriptionCollection
RealTimeStylus.GetTabletContextIdFromTablet