Share via


InkAnalyzer.ReadyToReconcile Event

Occurs when the ink analyzer is ready to reconcile background analysis results with the current state of the analyzer.

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

Syntax

'Declaration
Public Event ReadyToReconcile As ReadyToReconcileEventHandler
'Usage
Dim instance As InkAnalyzer
Dim handler As ReadyToReconcileEventHandler

AddHandler instance.ReadyToReconcile, handler
public event ReadyToReconcileEventHandler ReadyToReconcile
public:
event ReadyToReconcileEventHandler^ ReadyToReconcile {
    void add (ReadyToReconcileEventHandler^ value);
    void remove (ReadyToReconcileEventHandler^ value);
}
/** @event */
public void add_ReadyToReconcile (ReadyToReconcileEventHandler value)

/** @event */
public void remove_ReadyToReconcile (ReadyToReconcileEventHandler value)
In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

Remarks

The InkAnalyzer performs automatic reconciliation when the AnalysisModes property flag is set to AutomaticReconciliationEnabled. When the AutomaticReconciliationEnabled flag is not set, your application needs to reconcile background analysis results manually.

To handle manual reconciliation, follow these steps.

  1. Clear the AutomaticReconciliationEnabled flag in the AnalysisModes property of the InkAnalyzer.

  2. Add an event handler for the ReadyToReconcile event.

  3. Reconcile the analysis results by calling the Reconcile method from the event handler for the ReadyToReconcile event. To cancel the current background analysis operation, call the Abort method from the event handler for the ReadyToReconcile event.

The ink analyzer raises this event before it raises the InkAnalyzerStateChanging event.

For more information about synchronizing your application data with the InkAnalyzer, see Data Proxy with Ink Analysis.

The ink analyzer raises this event during background analysis.

Example

The following example defines a method, theInkAnalyzer_ReadyToReconcile, that handles the ReadyToReconcile event of an InkAnalyzer. If the Boolean value abortAnalysis is set, theInkAnalyzer_ReadyToReconcile aborts the analysis operation. Otherwise, it performs manual reconciliation and continues with the analysis operation.

Sub theInkAnalyzer_ReadyToReconcile(ByVal sender As Object, ByVal e As EventArgs) 
    MessageBox.Show("ReadyToReconcile")
    ' The source is an InkAnalyzer.
    Dim theInkAnalyzer As InkAnalyzer = CType(sender, InkAnalyzer)

    ' Check whether or not to abort analysis before continuing.
    If Me.abortAnalysis Then
        ' Abort analysis and update the analyzer's dirty region.
        Dim unanalyzedRegion As AnalysisRegion = theInkAnalyzer.Abort()
        theInkAnalyzer.DirtyRegion.Union(unanalyzedRegion)
    Else
        ' Manually reconcile the analysis results for this analysis phase.
        theInkAnalyzer.Reconcile()
    End If

End Sub 'theInkAnalyzer_ReadyToReconcile
void theInkAnalyzer_ReadyToReconcile(object sender, EventArgs e)
{
    MessageBox.Show("ReadyToReconcile");
    // The source is an InkAnalyzer.
    InkAnalyzer theInkAnalyzer = sender as InkAnalyzer;

    // Check whether or not to abort analysis before continuing.
    if (this.abortAnalysis)
    {
        // Abort analysis and update the analyzer's dirty region.
        AnalysisRegion unanalyzedRegion =
            theInkAnalyzer.Abort();
        theInkAnalyzer.DirtyRegion.Union(unanalyzedRegion);
    }
    else
    {
        // Manually reconcile the analysis results for this analysis phase.
        theInkAnalyzer.Reconcile();
    }

}

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

InkAnalyzer Class
InkAnalyzer Members
System.Windows.Ink Namespace