InfoPathControl2.Init(InfoPathControlSite) Method

Definition

Defines a method that must be provided by the developer to perform any initialization routines required when an instance of the control is added to an InfoPath form.

public:
 void Init(Microsoft::Office::Interop::InfoPath::InfoPathControlSite ^ pControlSite);
public void Init (Microsoft.Office.Interop.InfoPath.InfoPathControlSite pControlSite);
abstract member Init : Microsoft.Office.Interop.InfoPath.InfoPathControlSite -> unit
Public Sub Init (pControlSite As InfoPathControlSite)

Parameters

pControlSite
InfoPathControlSite

An instance of the InfoPathControlSite object.

Implements

Remarks

InfoPath calls the Init(InfoPathControlSite) method when a user adds an instance of the control to a view. InfoPath passes an instance of the InfoPathControlSite object to the Init(InfoPathControlSite) method when the control is initialized. The Init(InfoPathControlSite) object provides the Node property that provides access to the XML DOM node to which the control is bound, and the XDocument property for accessing the XDocument object associated with a form, which in turn provides access to the full InfoPath object model.

The InfoPathControl2 and InfoPathControlSite objects and their methods and properties are designed to be used only from the implementation of an ActiveX control. These objects and their members are not supported in InfoPath form code. For more information on how to create ActiveX controls that work with InfoPath, see the InfoPath Developer Center (http://msdn.microsoft.com/infopath).

Applies to