XmlEvents.Item property (String, String)

Office 2013 and later

Gets an XmlEvent from the XmlEvents collection for binding an event handler by specifying the XPath of the underlying XML document node that can raise the event and the name of the secondary data source that supplies the data.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

public abstract XmlEvent this[
	string xpath,
	string dataSourceName
] { get; }

Parameters

xpath
Type: System.String

The XPath of the node to which the event handler is bound.

dataSourceName
Type: System.String

The name of the secondary data source.

Property value

Type: Microsoft.Office.InfoPath.XmlEvent
The XmlEvent associated with the form node to which the event handler is bound.

Important noteImportant

The code to bind event handlers using the XmlEvents collection and XmlEvent class is not meant to be written by the developer in form code. The InternalStartup method and the event binding code within it are generated by InfoPath when you add event handlers using various user interface commands. You should not create the InternalStartup method or write any additional code within it yourself. For information about how to add event handlers using interface commands, see How to: Add an Event Handler.

Show: