AnalysisAlternate.Strokes 屬性
取得目前 AnalysisAlternate 物件所參考的筆劃。
命名空間: System.Windows.Ink
組件: IAWinFX (在 IAWinFX.dll 中)
語法
'宣告
Public ReadOnly Property Strokes As StrokeCollection
'用途
Dim instance As AnalysisAlternate
Dim value As StrokeCollection
value = instance.Strokes
public StrokeCollection Strokes { get; }
public:
property StrokeCollection^ Strokes {
StrokeCollection^ get ();
}
/** @property */
public StrokeCollection get_Strokes()
public function get Strokes () : StrokeCollection
屬性值
型別:System.Windows.Ink.StrokeCollection
這個 AnalysisAlternate 物件所參考的 StrokeCollection。
備註
![]() |
---|
如果您嘗試在呼叫 InkAnalyzer.ModifyTopAlternate 之後存取 Strokes 屬性,則會擲回 InvalidOperationException。 |
範例
這個範例會將位於 InkCanvas (名為 theInkCanvas) 上的所有筆劃標示為黑色,但會將來自 AnalysisAlternate (selectedAlternate) 的筆劃設定為綠色。接著會將選定的 AnalysisAlternate 設定為頂端替代項目。
' Set these strokes to green
For Each stroke As Stroke In theInkCanvas.Strokes
stroke.DrawingAttributes.Color = Colors.Black
Next stroke
For Each stroke As Stroke In selectedAlternate.Strokes
stroke.DrawingAttributes.Color = Colors.Green
Next stroke
' Use this as the top alternate
theInkAnalyzer.ModifyTopAlternate(selectedAlternate)
theResultsTextBox.Text = theInkAnalyzer.GetRecognizedString()
// Set these strokes to green
foreach (Stroke stroke in theInkCanvas.Strokes)
stroke.DrawingAttributes.Color = Colors.Black;
foreach (Stroke stroke in selectedAlternate.Strokes)
stroke.DrawingAttributes.Color = Colors.Green;
// Use this as the top alternate
theInkAnalyzer.ModifyTopAlternate(selectedAlternate);
theResultsTextBox.Text = theInkAnalyzer.GetRecognizedString();
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0