RealTimeStylus.GetTabletPropertyDescriptionCollection - метод
Обновлен: Ноябрь 2007
Returns the TabletPropertyDescriptionCollection collection that is associated with a given tablet context identifier.
Пространство имен: 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
The tablet context identifier for the Tablet object for which you want the packet property descriptions.
Возвращаемое значение
Тип: Microsoft.Ink.TabletPropertyDescriptionCollection
The TabletPropertyDescriptionCollection collection associated with a given tablet context identifier.
Заметки
This method throws an exception when the RealTimeStylus is disabled or disposed.
Примеры
This C# example is a snippet from the implementation of the IStylusAsyncPlugin interface's TabletAdded method. The form which implements the IStylusAsyncPlugin interface contains a TextBox object, theTextBox. The TabletAdded method displays information about the tablet that was added, calls the GetTabletContextIdFromTablet method to get the tablet's context identifier, and calls the GetTabletPropertyDescriptionCollection method to get the list of packet properties supported by the tablet.
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 с пакетом обновления 2 (SP2), Windows Server 2003
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0
См. также
Ссылки
Microsoft.StylusInput - пространство имен
Microsoft.Ink.TabletPropertyDescriptionCollection
RealTimeStylus.GetTabletContextIdFromTablet