ToolStripDropDown.BackgroundImageLayoutChanged Evento

Definizione

Si verifica quando il valore della proprietà BackgroundImage cambia.

public:
 event EventHandler ^ BackgroundImageLayoutChanged;
[System.ComponentModel.Browsable(false)]
public event EventHandler BackgroundImageLayoutChanged;
[System.ComponentModel.Browsable(false)]
public event EventHandler? BackgroundImageLayoutChanged;
[<System.ComponentModel.Browsable(false)>]
member this.BackgroundImageLayoutChanged : EventHandler 
Public Custom Event BackgroundImageLayoutChanged As EventHandler 

Tipo evento

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato l'uso di questo membro. Nell'esempio un gestore eventi segnala l'occorrenza dell'evento BackgroundImageLayoutChanged . Questo report consente di apprendere quando si verifica l'evento e può essere utile per eseguire il debug. Per segnalare più eventi o eventi che si verificano spesso, è consigliabile sostituire MessageBox.Show con Console.WriteLine o aggiungere il messaggio a una multilinea TextBox.

Per eseguire il codice di esempio, incollarlo in un progetto contenente un'istanza di tipo ToolStripDropDown denominata ToolStripDropDown1. Assicurarsi quindi che il gestore eventi sia associato all'evento BackgroundImageLayoutChanged .

private void ToolStripDropDown1_BackgroundImageLayoutChanged(Object sender, EventArgs e) {

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

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

End Sub

Commenti

Per ulteriori informazioni sulla gestione degli eventi, consultare gestione e generazione di eventi.

Si applica a