Share via


AnalysisAlternate.Strokes Property

Gets the strokes that are referenced by the current AnalysisAlternate object.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
XML Namespace:  https://schemas.microsoft.com/winfx/2006/xaml/presentation

Syntax

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

Property Value

The StrokeCollection is 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 on the InkCanvas, theInkCanvas, black, except for strokes from the AnalysisAlternate, selectedAlternate, which it sets to green. It then sets the selected AnalysisAlternate as the top alternate.

' 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();

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
System.Windows.Ink Namespace