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 设置成绿色,将其余所有来自 InkCollectortheInkCollector 的 Strokes 设置成黑色。然后,此示例刷新包含墨迹的 Panel (theNotesPanel)。

' 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

另请参见

参考

AnalysisAlternate 类

AnalysisAlternate 成员

Microsoft.Ink 命名空间