Cet article a fait l’objet d’une traduction automatique. Pour afficher l’article en anglais, activez la case d’option Anglais. Vous pouvez également afficher le texte anglais dans une fenêtre contextuelle en faisant glisser le pointeur de la souris sur le texte traduit.
Traduction
Anglais

Control.BackgroundImageLayoutChanged événement

 

Date de publication : novembre 2016

Se produit quand la propriété BackgroundImageLayout change.

Espace de noms:   System.Windows.Forms
Assembly:  System.Windows.Forms (dans System.Windows.Forms.dll)

public event EventHandler BackgroundImageLayoutChanged

This event is raised if the P:System.Windows.Forms.Control.BackgroundImageLayout property changes either programmatically or by user interaction.

For more information about handling events, see Handling and Raising Events.

The following code example demonstrates the use of this member. In the example, an event handler reports on the occurrence of the E:System.Windows.Forms.Control.BackgroundImageLayoutChanged event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing Overload:System.Windows.Forms.MessageBox.Show with Overload:System.Console.WriteLine or appending the message to a multiline T:System.Windows.Forms.TextBox.

To run the example code, paste it into a project that contains an instance of a type that inherits from T:System.Windows.Forms.Control, such as a T:System.Windows.Forms.Button or T:System.Windows.Forms.ComboBox. Then name the instance Control1 and ensure that the event handler is associated with the E:System.Windows.Forms.Control.BackgroundImageLayoutChanged event.

private void Control1_BackgroundImageLayoutChanged(Object sender, EventArgs e) {

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

}

.NET Framework
Disponible depuis 2.0
Retour au début
Afficher: