Поделиться через


InkAnalyzerBase.SetStrokeType - метод

Обновлен: Ноябрь 2007

Changes the type of the specified stroke.

Пространство имен:  System.Windows.Ink.AnalysisCore
Сборка:  IACore (в IACore.dll)

Синтаксис

'Декларация
Public Sub SetStrokeType ( _
    strokeId As Integer, _
    strokeType As StrokeType _
)
'Применение
Dim instance As InkAnalyzerBase
Dim strokeId As Integer
Dim strokeType As StrokeType

instance.SetStrokeType(strokeId, strokeType)
public void SetStrokeType(
    int strokeId,
    StrokeType strokeType
)
public:
void SetStrokeType(
    int strokeId, 
    StrokeType strokeType
)
public void SetStrokeType(
    int strokeId,
    StrokeType strokeType
)
public function SetStrokeType(
    strokeId : int, 
    strokeType : StrokeType
)

Параметры

  • strokeId
    Тип: System.Int32
    The stroke identifier of the stroke to which to assign strokeType.

Заметки

If a stroke's type is the StrokeType value Unspecified, the ink analyzer classifies the stroke during ink analysis. Otherwise, the analyzer uses the type set on the stroke.

The ink analyzer does not set the stroke type value as part of ink analysis. To get the type currently assigned to a stroke, call GetStrokeType.

If a stroke is associated with a context node that is not an unclassified ink node, this method moves the stroke to an unclassified ink node that contains strokes of the same language. If no such context node exists, this method creates a new unclassified ink node and adds the stroke to it. An unclassified ink node is a ContextNodeBase that has a Type property value of UnclassifiedInk.

If this method moves a stroke, this method also adds the stroke's bounding box to the ink analyzer's DirtyRegion.

This method does not move a stroke if the strokeType parameter matches the stroke's current type.

If the specified stroke is not associated with the ink analyzer, this method returns without updating the ink analyzer.

Примеры

The following example checks the type of a specified stroke and sets it to Unspecified if it is not already set to Unspecified. The InkAnalyzerBase, theInkAnalyzerBase, contains stroke data for the stroke identifier, theStrokeId.

' If the specified stroke is not set to unspecified,
' Set the stroke's type to unspecified.
Dim theStrokeType As System.Windows.Ink.AnalysisCore.StrokeType = _
    theInkAnalyzerBase.GetStrokeType(theStrokeId)
If System.Windows.Ink.AnalysisCore.StrokeType.Unspecified <> theStrokeType Then
    theInkAnalyzerBase.SetStrokeType( _
        theStrokeId, System.Windows.Ink.AnalysisCore.StrokeType.Unspecified)
End If
// If the specified stroke is not set to unspecified,
// Set the stroke's type to unspecified.
System.Windows.Ink.AnalysisCore.StrokeType theStrokeType =
    theInkAnalyzerBase.GetStrokeType(theStrokeId);
if (System.Windows.Ink.AnalysisCore.StrokeType.Unspecified != theStrokeType)
{
    theInkAnalyzerBase.SetStrokeType(theStrokeId,
        System.Windows.Ink.AnalysisCore.StrokeType.Unspecified);
}

Платформы

Windows Vista, Windows XP с пакетом обновления 2 (SP2), Windows Server 2003

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkAnalyzerBase Класс

InkAnalyzerBase - члены

System.Windows.Ink.AnalysisCore - пространство имен

InkAnalyzerBase.GetStrokeType

InkAnalyzerBase.SetStrokesType

System.Windows.Ink.AnalysisCore.StrokeType