LoadingEventArgs.SetDefaultView, méthode (String)
Définit la vue par défaut du formulaire en spécifiant le nom de la vue.
Espace de noms : Microsoft.Office.InfoPath
Assembly : Microsoft.Office.InfoPath (dans Microsoft.Office.InfoPath.dll)
Syntaxe
'Déclaration
Public MustOverride Sub SetDefaultView ( _
view As String _
)
'Utilisation
Dim instance As LoadingEventArgs
Dim view As String
instance.SetDefaultView(view)
public abstract void SetDefaultView(
string view
)
Paramètres
- view
Type : System.String
Nom de la vue.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Le paramètre passé à cette méthode est une référence NULL (Nothing dans Visual Basic). |
ArgumentException | Le paramètre passé à cette méthode n'est pas valide. Par exemple, le type ou le format est incorrect. |
Remarques
Ce type ou ce membre est accessible à partir du code exécuté dans les formulaires ouverts dans Microsoft InfoPath Filler ou dans un navigateur Web.
Exemples
L'exemple suivant utilise la méthode SetDefaultView(System.String) dans le gestionnaire d'événements Loading pour définir la vue intitulée « View2 » comme vue par défaut.
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
e.SetDefaultView("View2");
}
Public Sub FormEvents_Loading(ByVal sender As Object, _
ByVal e As LoadingEventArgs)
e.SetDefaultView("View2")
End Sub