Modifica

Condividi tramite


InfoPathControl.Uninit Method

Definition

Defines a method that must be provided by the developer to perform any clean up routines that are required before an instance of the control is removed from a view.

public:
 void Uninit();
public void Uninit ();
abstract member Uninit : unit -> unit
Public Sub Uninit ()

Remarks

InfoPath calls the Uninit method immediately before the control is removed from the view and destroyed. Note that because InfoPath forms make use of XSL transforms to represent views, any changes in the data or explicit calls to the object model can cause InfoPath to automatically synchronize the view with the data that is contained in a form's underlying XML document, which destroys and recreates the view. This means that ActiveX controls are likely to be created and destroyed much more often within a given session than controls in Visual Basic forms or Web forms. ActiveX controls which need to preserve state information independent of the bound data, such as the state of the scroll position, should create routines in the Init(InfoPathControlSite) method of the control that use the SetNamedNodeProperty(IXMLDOMNode, String, String) method to save this information, and use the GetNamedNodeProperty(Object, String, String) method to restore state information during the Init method call.

The InfoPathControl 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