AnalysisAlternate.Strokes 屬性
取得這個 AnalysisAlternate 物件所參考的 Strokes 物件。
命名空間: Microsoft.Ink
組件: Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)
語法
'宣告
Public ReadOnly Property Strokes As Strokes
'用途
Dim instance As AnalysisAlternate
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
這個 AnalysisAlternate 物件所參考的 Strokes 物件。
備註
注意事項: |
---|
如果嘗試在呼叫 InkAnalyzer.ModifyTopAlternate 之後存取 Strokes 屬性,則會擲回 InvalidOperationException。 |
範例
這個範例除了把來自 AnalysisAlternate (變數名稱為 selectedAlternate) 的 Strokes 設定為綠色以外,其餘來自 InkCollector (變數名稱為 theInkCollector) 的 Strokes 都會變成黑色,然後重新整理含有 theNotesPanel 筆墨的 Panel。
' Set these strokes to green
Dim inkStroke As Stroke
For Each inkStroke In theInkCollector.Ink.Strokes
inkStroke.DrawingAttributes = New DrawingAttributes(Color.Black)
Next inkStroke
For Each inkStroke In selectedAlternate.Strokes
inkStroke.DrawingAttributes = New DrawingAttributes(Color.Green)
Next inkStroke
theNotesPanel.Refresh()
' Use this as the top alternate
theInkAnalyzer.ModifyTopAlternate(selectedAlternate)
theResultsTextBox.Text = theInkAnalyzer.GetRecognizedString()
// Set these strokes to green
foreach (Stroke stroke in theInkCollector.Ink.Strokes)
stroke.DrawingAttributes = new DrawingAttributes(Color.Black);
foreach (Stroke stroke in selectedAlternate.Strokes)
stroke.DrawingAttributes = new DrawingAttributes(Color.Green);
theNotesPanel.Refresh();
// 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