XMLNode::ContextEnter Event

 

Occurs when the cursor is placed inside an XMLNode or one of its descendent nodes, from an area outside of the context of the node.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

event ContextChangeEventHandler^ ContextEnter {
	void add(ContextChangeEventHandler^ value);
	void remove(ContextChangeEventHandler^ value);
}

The ContextEnter event differs from the Select event. The ContextEnter event is raised only when the context changes. For more information, see XMLNode Control.

The following code example demonstrates event handlers for the Select, Deselect, ContextEnter, and ContextLeave events. When the Select and Deselect events are raised, the event handlers add double lines to the borders of the selection or remove the double lines, depending on the event. When the ContextEnter and ContextLeave events are raised, the event handlers display messages that state the names of the newly selected node and the previously selected node. This example assumes that the current document contains an XMLNode named CustomerNode.

No code example is currently available or this language may not be supported.
Return to top
Show: