Freigeben über


AnalysisAlternate.Strokes Property

Gets the Strokes objects that are referenced by this AnalysisAlternate object.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in microsoft.ink.analysis.dll)

Syntax

'Declaration
Public ReadOnly Property Strokes As Strokes
'Usage
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
Not applicable.

Property Value

The Strokes objects that are referenced by this AnalysisAlternate object.

Remarks

Note

An InvalidOperationException is thrown if you attempt to access the Strokes property after InkAnalyzer.ModifyTopAlternate is called.

Example

This example makes all of the Strokes from an InkCollector, theInkCollector, black except for Strokes from the AnalysisAlternate, selectedAlternate, which it sets to green. It then refreshes the Panel that contains the ink, 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();

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

AnalysisAlternate Class
AnalysisAlternate Members
Microsoft.Ink Namespace