Stroke の型を返します。
名前空間 : System.Windows.Ink
アセンブリ : IAWinFX (IAWinFX.dll 内)
構文
'宣言
Public Function GetStrokeType ( _
stroke As Stroke _
) As StrokeType
'使用
Dim instance As InkAnalyzer
Dim stroke As Stroke
Dim returnValue As StrokeType
returnValue = instance.GetStrokeType(stroke)
public StrokeType GetStrokeType(
Stroke stroke
)
public:
StrokeType GetStrokeType(
Stroke^ stroke
)
public StrokeType GetStrokeType(
Stroke stroke
)
public function GetStrokeType(
stroke : Stroke
) : StrokeType
パラメータ
- stroke
型 : System.Windows.Ink.Stroke
任意の型の分類で識別されるストローク。
戻り値
型 : System.Windows.Ink.StrokeType
stroke の分類。
解説
ストロークの型が System.Windows.Ink.StrokeType 値 Unspecified の場合、InkAnalyzer はインク分析時にストロークを分類します。それ以外の場合、InkAnalyzer はストロークで設定された型を使用します。
ストロークの型を指定または変更するには、SetStrokeType() または SetStrokesType() を使用します。
例
この例では、ContextNode 内のすべてのストロークの型を返すために GetStrokeTypesInNode メソッドを定義します。
' Iterate through the strokes within the context node and add the
' stroke types to a collection.
Dim theStrokeTypes As New System.Collections.ArrayList()
Dim theStroke As Stroke
For Each theStroke In theContextNode.Strokes
Dim theStrokeType As StrokeType = theInkAnalyzer.GetStrokeType(theStroke)
If Not theStrokeTypes.Contains(theStrokeType) Then
theStrokeTypes.Add(theStrokeType)
End If
Next theStroke
// Iterate through the strokes within the context node and add the
// stroke types to a collection.
System.Collections.ArrayList theStrokeTypes =
new System.Collections.ArrayList();
foreach (Stroke theStroke in theContextNode.Strokes)
{
StrokeType theStrokeType =
theInkAnalyzer.GetStrokeType(theStroke);
if (!theStrokeTypes.Contains(theStrokeType))
{
theStrokeTypes.Add(theStrokeType);
}
}
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0