Compartir a través de


InkAnalyzerBase.UpdateStrokesCacheBase Event

Occurs before the ink analyzer accesses stroke data.

Namespace: System.Windows.Ink.AnalysisCore
Assembly: IACore (in iacore.dll)

Syntax

'Declaration
Public Event UpdateStrokesCacheBase As UpdateStrokesCacheBaseEventHandler
'Usage
Dim instance As InkAnalyzerBase
Dim handler As UpdateStrokesCacheBaseEventHandler

AddHandler instance.UpdateStrokesCacheBase, handler
public event UpdateStrokesCacheBaseEventHandler UpdateStrokesCacheBase
public:
event UpdateStrokesCacheBaseEventHandler^ UpdateStrokesCacheBase {
    void add (UpdateStrokesCacheBaseEventHandler^ value);
    void remove (UpdateStrokesCacheBaseEventHandler^ value);
}
/** @event */
public void add_UpdateStrokesCacheBase (UpdateStrokesCacheBaseEventHandler value)

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

Remarks

The ink analyzer raises this event during ink analysis when it accesses one or more strokes for which the packet data has been cleared. To update the stroke packet data, use the UpdateStrokeData or UpdateStrokesData method.

The ink analyzer does not raise this event when accessing a partially populated ink leaf node when the location of the node has not been set by the ink analyzer.

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

Example

The following example defines a method, theInkAnalyzerBase_UpdateStrokesCacheBase, that handles the UpdateStrokesCacheBase event of an InkAnalyzerBase. This method retrieves stroke data from an Ink object, theInk. If your application is using an Ink object to store stroke data, your application should use the derived InkAnalyzer class.

''' <summary>
''' Handles the UpdateStrokesCacheBase event of an InkAnalyzerBase.
''' </summary>
''' <param name="sender">The source of the event.</param>
''' <param name="e">The event data.</param>
''' <remarks>
''' This method converts stroke data to packet data for example only.
''' The InkAnalyzerBase is used when your application is handling packet
''' data. If your application uses stroke data from an Ink object, then
''' you would use InkAnalyzer.
''' </remarks>
Sub theInkAnalyzerBase_UpdateStrokesCacheBase( _
ByVal sender As Object, _
ByVal e As System.Windows.Ink.AnalysisCore.UpdateStrokesCacheBaseEventArgs)
    ' The source is an InkAnalyzerBase.
    Dim theInkAnalyzerBase As System.Windows.Ink.AnalysisCore.InkAnalyzerBase = _
        DirectCast(sender, System.Windows.Ink.AnalysisCore.InkAnalyzerBase)

    ' Add the stroke data to the ink analyzer.
    Dim theStroke As Microsoft.Ink.Stroke
    For Each theStroke In Me.theInk.CreateStrokes(e.GetStrokeIds())
        theInkAnalyzerBase.UpdateStrokeData( _
            theStroke.Id, _
            theStroke.GetPacketData(), _
            theStroke.PacketDescription)
    Next theStroke

End Sub 'theInkAnalyzerBase_UpdateStrokesCacheBase
/// <summary>
/// Handles the UpdateStrokesCacheBase event of an InkAnalyzerBase.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
/// <remarks>
/// This method converts stroke data to packet data for example only.
/// The InkAnalyzerBase is used when your application is handling packet
/// data. If your application uses stroke data from an Ink object, then
/// you would use InkAnalyzer.
/// </remarks>
void theInkAnalyzerBase_UpdateStrokesCacheBase(
    object sender, System.Windows.Ink.AnalysisCore.UpdateStrokesCacheBaseEventArgs e)
{
    // The source is an InkAnalyzerBase.
    System.Windows.Ink.AnalysisCore.InkAnalyzerBase theInkAnalyzerBase =
        sender as System.Windows.Ink.AnalysisCore.InkAnalyzerBase;

    // Add the stroke data to the ink analyzer.
    foreach (Microsoft.Ink.Stroke theStroke
        in this.theInk.CreateStrokes(e.GetStrokeIds()))
    {
        theInkAnalyzerBase.UpdateStrokeData(
            theStroke.Id, theStroke.GetPacketData(),
            theStroke.PacketDescription);
    }
}

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

InkAnalyzerBase Class
InkAnalyzerBase Members
System.Windows.Ink.AnalysisCore Namespace
InkAnalyzerBase.UpdateStrokeData
InkAnalyzerBase.UpdateStrokesData