Evento _XDocumentEventSink2_Event.OnSwitchView
Ocurre después de haber cambiado de vista satisfactoriamente en un formulario de Microsoft InfoPath.
Espacio de nombres: Microsoft.Office.Interop.InfoPath.SemiTrust
Ensamblado: Microsoft.Office.Interop.InfoPath.SemiTrust (en Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Sintaxis
'Declaración
Event OnSwitchView As _XDocumentEventSink2_OnSwitchViewEventHandler
'Uso
Dim instance As _XDocumentEventSink2_Event
Dim handler As _XDocumentEventSink2_OnSwitchViewEventHandler
AddHandler instance.OnSwitchView, handler
event _XDocumentEventSink2_OnSwitchViewEventHandler OnSwitchView
Comentarios
Este controlador de eventos no permite a los usuarios cancelar una operación.
Nota
El evento OnSwitchView ocurre también cuando se abre un formulario por primera vez.
Ejemplos
En el siguiente ejemplo, el controlador de eventos OnSwitchView se utiliza para mostrar el nombre de la vista que aparece cuando se produce el cambio de vista:
[InfoPathEventHandler(EventType=InfoPathEventType.OnSwitchView)]
public void OnSwitchView(DocEvent e)
{
thisXDocument.UI.Alert("Loading the view " + thisXDocument.View.Name);
}
Vea también
Referencia
interfaz _XDocumentEventSink2_Event
Miembros _XDocumentEventSink2_Event
Espacio de nombres Microsoft.Office.Interop.InfoPath.SemiTrust