Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
The code skeleton for an event handler associated with the ViewSwitched event, which uses the ViewSwitchedEventHandler delegate, should be added only from the Microsoft Office InfoPath 2007 user interface. For more information on how to add event handlers in InfoPath, see How Do I: Add an Event Handler.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
For an example of using the ViewSwitchedEventHandler delegate, see the sample code in the ViewSwitched event of the FormEvents class.