Share via


InkAnalyzerBase.UpdateStrokesCacheBase 事件

在墨迹分析器访问笔画数据之前发生。

命名空间:  System.Windows.Ink.AnalysisCore
程序集:  IACore(在 IACore.dll 中)

语法

声明
Public Event UpdateStrokesCacheBase As UpdateStrokesCacheBaseEventHandler
用法
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)
JScript 不支持事件。

备注

当墨迹分析器访问一个或多个已清除了数据包数据的笔画时,墨迹分析器在墨迹分析过程中引发此事件。若要更新笔画数据包数据,请使用 UpdateStrokeDataUpdateStrokesData 方法。

如果访问部分填充的墨迹叶节点时,墨迹分析器还未设置该节点的位置,则墨迹分析器不引发此事件。

有关将应用程序数据与 InkAnalyzerBase 同步的更多信息,请参见Data Proxy with Ink Analysis

示例

下面的示例定义 theInkAnalyzerBase_UpdateStrokesCacheBase 方法,该方法处理 InkAnalyzerBase 的 UpdateStrokesCacheBase 事件。此方法从 Ink 对象 theInk 中检索笔画数据。如果应用程序要使用 Ink 对象存储笔画数据,则应用程序应使用派生的 InkAnalyzer 类。

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

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkAnalyzerBase 类

InkAnalyzerBase 成员

System.Windows.Ink.AnalysisCore 命名空间

InkAnalyzerBase.UpdateStrokeData

InkAnalyzerBase.UpdateStrokesData