This documentation is archived and is not being maintained.

InkAnalyzer.BackgroundAnalyze Method

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

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

public bool BackgroundAnalyze()

Return Value

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

When this method is called, the InkAnalyzer performs the ink analysis on a background thread. The InkAnalyzer raises events generated by the background analysis on the thread upon which the InkAnalyzer was created.

The SynchronizingObject property controls upon which thread the InkAnalyzer raises events 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.

The InkAnalyzer analyzes ink within its DirtyRegion during a call to Analyze or BackgroundAnalyze. However, the ink analyzer may expand the analysis operation to include neighboring regions.

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 background analysis. For more information about ink analysis, see Ink Analysis Overview.

This method throws an exception under the following circumstances.

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

if (!theInkAnalyzer.IsAnalyzing)
{
    bool started = theInkAnalyzer.BackgroundAnalyze();
}

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

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.

.NET Framework

Supported in: 3.0
Show: