InkAnalyzer.Load Method (Stream)

Loads saved analysis results into the InkAnalyzer.

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

Syntax

'Declaration
Public Function Load ( _
    stream As Stream _
) As Boolean
'Usage
Dim instance As InkAnalyzer
Dim stream As Stream
Dim returnValue As Boolean

returnValue = instance.Load(stream)
public bool Load (
    Stream stream
)
public:
bool Load (
    Stream^ stream
)
public boolean Load (
    Stream stream
)
public function Load (
    stream : Stream
) : boolean
Not applicable.

Parameters

  • stream
    A stream that contains the saved analysis results.

Return Value

true if the analysis results loaded successfully; otherwise, false.

Remarks

When the InkAnalyzer adds a ContextNode from the saved results, it assigns a new globally unique identifier (GUID) to the ContextNode object's Id property.

This method appends the saved analysis results to existing results. To ensure that the combined results are ordered correctly, add the area containing the loaded context nodes to the ink analyzer's DirtyRegion and then reanalyze the ink.

If a saved analysis hint conflicts with an existing analysis hint, the InkAnalyzer does not load the saved hint but loads the rest of the saved results. However, if saved stroke data is within the area of a saved analysis hint that is not loaded, the InkAnalyzer adds the bounding box of the stroke to the analyzer's DirtyRegion. If saved stroke data is within an existing analysis hint's area, the analyzer also adds the bounding box of the stroke to the analyzer's DirtyRegion. For more information about analysis hints, see AnalysisHintNode.

The InkAnalyzer raises the ContextNodeCreated, ContextNodeLinkAdding, and ContextNodePropertiesUpdated events as it loads the saved results.

Example

This example loads saved analysis results from a MemoryStream, theSavedResults, into the InkAnalyzer, theInkAnalyzer.

' Load previously saved analysis results and associated ink data.
successful = Me.theInkAnalyzer.Load(theSavedResults)
// Load previously saved analysis results and associated ink data.
successful = this.theInkAnalyzer.Load(theSavedResults);

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
System.Windows.Ink.InkAnalyzer.Ink
System.Windows.Ink.InkAnalyzer.SaveResults
System.Windows.Ink.ContextNode
System.Windows.Ink.Ink
System.Windows.Ink.Stroke