Partager via


Control.BackgroundImageLayoutChanged Événement

Définition

Se produit lorsque la BackgroundImageLayout propriété change.

public:
 event EventHandler ^ BackgroundImageLayoutChanged;
public event EventHandler BackgroundImageLayoutChanged;
public event EventHandler? BackgroundImageLayoutChanged;
member this.BackgroundImageLayoutChanged : EventHandler 
Public Custom Event BackgroundImageLayoutChanged As EventHandler 

Type d'événement

Exemples

L’exemple de code suivant illustre l’utilisation de ce membre. Dans l’exemple, un gestionnaire d’événements signale l’occurrence de l’événement BackgroundImageLayoutChanged . Ce rapport vous aide à apprendre quand l’événement se produit et peut vous aider à déboguer. Pour signaler plusieurs événements ou événements qui se produisent fréquemment, envisagez de MessageBox.ShowConsole.WriteLine remplacer ou d’ajouter le message à un multiligne TextBox.

Pour exécuter l’exemple de code, collez-le dans un projet qui contient une instance d’un type qui hérite Control, par exemple un Button ou ComboBox. Nommez ensuite l’instance Control1 et vérifiez que le gestionnaire d’événements est associé à l’événement BackgroundImageLayoutChanged .

private void Control1_BackgroundImageLayoutChanged(Object sender, EventArgs e) {

   MessageBox.Show("You are in the Control.BackgroundImageLayoutChanged event.");
}
Private Sub Control1_BackgroundImageLayoutChanged(sender as Object, e as EventArgs) _ 
     Handles Control1.BackgroundImageLayoutChanged

   MessageBox.Show("You are in the Control.BackgroundImageLayoutChanged event.")

End Sub

Remarques

Cet événement est déclenché si la BackgroundImageLayout propriété change par programmation ou par interaction utilisateur.

Pour plus d'informations sur la gestion des événements, voir gestion et déclenchement d’événements.

S’applique à

Voir aussi