Düzenle

Aracılığıyla paylaş


InfoPathControl2.RefreshState Method

Definition

Defines a method that InfoPath calls when it must refresh the state of an instance of the control in a view.

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

Remarks

In InfoPath 2007, when a change occurs to the XML node the control is bound to, InfoPath calls the SaveState() method implemented by the control so that InfoPath can destroy the control, and the control can successfully restore its state when it was reconstructed. In InfoPath, changes were made so that ActiveX controls are not always destroyed and reconstructed when a change to the bound XML node occurs. To fully implement this change, InfoPath needs a way to communicate to the control that a change to the bound XML node has occurred, and that the control should refresh its state by reading the updated information in the XML node. To do that, the developer of the control must implement the RefreshState() method on the control.

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