InkAnalyzer.BackgroundAnalyze Method

Performs asynchronous ink analysis, which includes: layout analysis, writing and drawing classification, and handwriting recognition.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

'Declaration
Public Function BackgroundAnalyze As Boolean
'Usage
Dim instance As InkAnalyzer 
Dim returnValue As Boolean 

returnValue = instance.BackgroundAnalyze()
public bool BackgroundAnalyze()
public:
bool BackgroundAnalyze()
public function BackgroundAnalyze() : boolean

Return Value

Type: System.Boolean
true if the asynchronous ink analysis has started; otherwise, false.

Remarks

When this method is called, the InkAnalyzer performs ink analysis on a background thread. The InkAnalyzer raises events generated by the ink analysis on the very same thread that was used to create the SynchronizingObject. If the InkAnalyzer.SynchronizingObject property is nulla null reference (Nothing in Visual Basic), the InkAnalyzer also raises these events on a background thread.

The SynchronizingObject property controls the thread upon which the InkAnalyzer raises events that are generated during background analysis.

This method does not start a new background analysis operation under the following circumstances.

  • The ink analyzer is currently performing background analysis.

  • DirtyRegion represents an empty area.

InkAnalyzer may expand the analysis operation to include neighboring regions even though it analyzes ink within its DirtyRegion during a call to Analyze or BackgroundAnalyze.

This method sets the DirtyRegion property to an empty region.

If stroke data was added to the ink analyzer after the call to BackgroundAnalyze, the ink analyzer may update the DirtyRegion property during the reconcile phase of ink analysis.

The value of the AnalysisModes property specifies how the ink analyzer performs its background analysis. For more information about ink analysis, see Ink Analysis Overview.

This method throws an exception under the following circumstances.

  • Your application has the [F:System.Windows.Ink. AnalysisModes.AutomaticReconciliationEnabled] flag cleared in the AnalysisModes property and has not added an event handler for the ReadyToReconcile event.

  • Your application has not added an event handler for either the IntermediateResultsUpdated event or the Results event.

Examples

This example starts background ink analysis on an InkAnalyzer, named theInkAnalyzer, if the ink analyzer is not currently performing ink analysis.

If Not theInkAnalyzer.IsAnalyzing Then 
    Dim started As Boolean = theInkAnalyzer.BackgroundAnalyze()
End If
if (!theInkAnalyzer.IsAnalyzing)
{
    bool started = theInkAnalyzer.BackgroundAnalyze();
}

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class

InkAnalyzer Members

System.Windows.Ink Namespace

InkAnalyzerBaseAnalysisModes

InkAnalyzerBaseDirtyRegion

InkAnalyzerBaseRootNode

InkAnalyzerBaseAnalyze