この ContextNode に関連付けられている Strokes を取得します。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink.Analysis (Microsoft.Ink.Analysis.dll 内)
構文
'宣言
Public ReadOnly Property Strokes As Strokes
'使用
Dim instance As ContextNode
Dim value As Strokes
value = instance.Strokes
public Strokes Strokes { get; }
public:
property Strokes^ Strokes {
Strokes^ get ();
}
/** @property */
public Strokes get_Strokes()
public function get Strokes () : Strokes
プロパティ値
型 : Microsoft.Ink.Strokes
ContextNode に関連付けられている Strokes。
解説
ContextNode がリーフ ノードでない場合、このプロパティはすべてのリーフの子孫のストロークを返します。
ノードが、TextWordNode、ImageNode、AnalysisHintNode などのストロークを持たない型の場合、このプロパティは空のストローク コレクションを返します。
例
この例では、赤の DrawingAttributes を ContextNode のストロークに割り当て、既定の描画属性を他のすべてのストロークに割り当てるメソッドを示します。Panel、theNotePanel に結合された InkCollector、theInkCollector がストロークを収集しました。
Private Sub MarkNodeAsRed(ByVal selectedNode As ContextNode)
' Set all node strokes to black, but this one to red
Dim inkStroke As Stroke
For Each inkStroke In Me.theInkCollector.Ink.Strokes
If Not (selectedNode Is Nothing) AndAlso _
selectedNode.Strokes.Contains(inkStroke) Then
inkStroke.DrawingAttributes = New DrawingAttributes(Color.Red)
Else
inkStroke.DrawingAttributes = Me.theInkCollector.DefaultDrawingAttributes
End If
Next inkStroke
theNotesPanel.Refresh()
End Sub 'MarkNodeAsRed
private void MarkNodeAsRed(ContextNode selectedNode)
{
// Set all node strokes to black, but this one to red
foreach (Stroke stroke in this.theInkCollector.Ink.Strokes)
{
if (selectedNode != null &&
selectedNode.Strokes.Contains(stroke))
stroke.DrawingAttributes = new DrawingAttributes(Color.Red);
else
stroke.DrawingAttributes = this.theInkCollector.DefaultDrawingAttributes;
}
theNotesPanel.Refresh();
}
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0