IsConfirmed Method

ContextNode.IsConfirmed Method

Gets a value that indicates whether the ContextNode object is confirmed. InkAnalyzer cannot change the node type and associated strokes for confirmed objects.

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

public bool IsConfirmed (
	ConfirmationType type
public boolean IsConfirmed (
	ConfirmationType type
public function IsConfirmed (
	type : ConfirmationType
) : boolean
Not applicable.



The confirmation type to check against.

Return Value

true if the node type is confirmed; otherwise, false.

The following example uses the IsConfirmed method to switch the confirmation state of the ContextNode. The example is an event handler for the Control.MouseUpControl.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 MenuItemMenuItem, confirmMenuItem. When 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 mouse up event into ink coordinates. It 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 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.

.NET Framework

Supported in: 3.0

Community Additions

© 2016 Microsoft