DocActionEventObject Interface

Definition

An event object that is used during a Microsoft InfoPath button click event.

public interface class DocActionEventObject : Microsoft::Office::Interop::InfoPath::SemiTrust::DocActionEvent
[System.Runtime.InteropServices.Guid("096cd63a-0786-11d1-95fa-0080c78ee3bb")]
public interface DocActionEventObject : Microsoft.Office.Interop.InfoPath.SemiTrust.DocActionEvent
type DocActionEventObject = interface
    interface DocActionEvent
    interface DocReturnEvent
    interface DocEvent
Public Interface DocActionEventObject
Implements DocActionEvent
Attributes
Implements

Examples

In the following example, the Source property of the DocActionEvent object is used to display the source XML data of the inner-most XML Document Object Model (DOM) node of the form's underlying XML document, which contains the button:

[InfoPathEventHandler(MatchPath="ShowDocActionEventSource", EventType=InfoPathEventType.OnClick)]
public void ShowDocActionEventSource_OnClick(DocActionEvent e)
{
 thisXDocument.UI.Alert("Source: " + e.<span class="label">Source</span>.xml);
}

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeDocActionEvent.

The DocActionEvent object provides a number of properties that can be used within a button click event to programmatically interact with the data in a form's underlying XML document and to control the success or failure of the event.

The DocActionEvent object is passed as a parameter to the OnClick event of a button that is contained in a view of an InfoPath form. Its properties are available only during the OnClick event.

Properties

ReturnStatus

Gets or sets the return status of the OnClick event.

(Inherited from DocActionEvent)
Source

Gets a reference to the inner-most XML Document Object Model (DOM) node of a form's underlying XML document.

(Inherited from DocActionEvent)
XDocument

Gets a reference to the XDocument object that is associated with the DocActionEventObject event during an OnClick event.

(Inherited from DocActionEvent)

Applies to