ContextChangeEventArgs Interface

 

Provides data for the Select, Deselect, ContextEnter and ContextLeave events of an XMLNode object and the ContextEnter, ContextLeave, Select, and Deselect events of an XMLNodes object.

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

[GuidAttribute("7403c9da-5555-41ed-8288-bf92e780d660")]
public interface class ContextChangeEventArgs

NameDescription
System_CAPS_pubpropertyNewXMLNode

Gets the XMLNode control to which the selection has moved.

System_CAPS_pubpropertyOldXMLNode

Gets the XMLNode control from which the selection has moved.

System_CAPS_pubpropertyReason

Gets the reason why the selection has changed.

System_CAPS_pubpropertySelection

Gets the selected text, including the XML elements.

The following code example demonstrates event handlers for the XMLNode::Select, XMLNode::Deselect, XMLNode::ContextEnter, and XMLNode::ContextLeave events. When the XMLNode::Select and XMLNode::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 XMLNode::ContextEnter and XMLNode::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: