This documentation is archived and is not being maintained.

ConfirmationType Enumeration

Defines values that specify the type confirmation that can occur on a ContextNode object.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

public enum ConfirmationType

Member nameDescription
NoneSpecifies that no confirmation is applied. The InkAnalyzer is free to change a context node or any of its descendants as needed.
NodeTypeAndPropertiesSpecifies that the InkAnalyzer cannot change type or any properties of the specified context node.

The ink analyzer cannot add or remove strokes from ink leaf nodes that are confirmed with this confirmation type.

TopBoundarySpecifies that the InkAnalyzer will not perform operations, including adding ink or merging with other ContextNodes, that cause the TopBoundary to move beyond the current top boundary. For example:
  • An application analyzes a set of Ink, and a ParagraphNode is identified.

  • The application confirms the TopBoundary of this paragraph.

  • The user of the application writes new ink above the current paragraph.

  • When analyze is called again, the new ink will not be incorporated into the Confirmed paragraph node.

Since only the top-left corner boundary is confirmed, the ContextNode can continue to grow in other directions. Deleting strokes can cause the top boundary to move down. Translating the ContextNode can cause the location to change, but will not allow additional ink to be merged in the new location.

Since it confirms the top left corner of the paragraph, not just the top, this top-left corner can only be updated if strokes are deleted from the top left corner. Adding strokes to the left of the paragraph doesn't merge the strokes with the paragraph, however you can add strokes to the right of the paragraph and below the paragraph.

This ConfirmationType is only applicable to paragraph nodes.

You can use NodeTypeAndProperties only for ContextNode objects of type InkWord and InkDrawing. Otherwise, an InvalidOperationException is thrown.

The following example is an event handler for the MouseUp event on a Panel, theNotesPanel, which is collecting ink through an InkCollector, theInkCollector. The application has a Boolean, confirmMode, which is set by a MenuItem, confirmMenuItem. In "confirm" mode, the user clicks a word to confirm it (or to turn off confirmation if the node is already confirmed). The example converts the MouseUp mouse up event into ink coordinates, and uses HitTest and FindNodesOfType to find the appropriate nodes. After the nodes are found, Confirm is called to toggle the confirmation. Finally, the application is taken out of "confirm" mode.

private void theNotesPanel_MouseUp(object sender, MouseEventArgs e)
    if (this.confirmMode)
        // Translate coordinates into ink dimensions
        Point hitPoint = new Point(e.X, e.Y);
        Graphics panelGraphics = this.theNotesPanel.CreateGraphics();
        this.theInkCollector.Renderer.PixelToInkSpace(panelGraphics, ref hitPoint);

        // Find the strokes that the user selected
        Strokes selectedStrokes = this.theInkCollector.Ink.HitTest(hitPoint, 10);

        // Find the ink word nodes that correspond to those strokes
        ContextNodeCollection selectedNodes =

        // Toggle the confirmation type on these nodes 
        foreach (ContextNode selectedNode in selectedNodes)
            if (selectedNode.IsConfirmed(ConfirmationType.NodeTypeAndProperties))

        // No longer in "confirm" mode
        this.confirmMode = false;
        this.confirmMenuItem.Checked = false;
        this.theInkCollector.Enabled = true;


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