共用方式為


Control.BackgroundImageLayoutChanged 事件

定義

當房產變更時 BackgroundImageLayout 發生。

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

事件類型

範例

以下程式碼範例展示了此成員的使用方式。 在這個例子中,事件處理者會回報事件 BackgroundImageLayoutChanged 的發生情況。 此報告能幫助您了解事件發生時間,並協助除錯。 若要報告多個事件或頻繁發生的事件,請考慮將MessageBox.Show訊息替換Console.WriteLine為或附加於多行TextBox

要執行範例程式碼,將它貼到包含繼承自 Control的型別實例的專案中,例如 a ButtonComboBox。 接著命名實例 Control1 ,並確保事件處理程序與事件 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

備註

BackgroundImageLayout 屬性透過程式或使用者互動改變,則會觸發此事件。

如需處理事件的詳細資訊,請參閱 處理和引發事件

適用於

另請參閱