DataGrid.LoadingRow 事件

定義

在具現化 (Instantiated) DataGridRow 之後發生,好讓您可以在使用它之前先加以自訂。

public:
 event EventHandler<System::Windows::Controls::DataGridRowEventArgs ^> ^ LoadingRow;
public event EventHandler<System.Windows.Controls.DataGridRowEventArgs> LoadingRow;
member this.LoadingRow : EventHandler<System.Windows.Controls.DataGridRowEventArgs> 
Public Custom Event LoadingRow As EventHandler(Of DataGridRowEventArgs) 
Public Event LoadingRow As EventHandler(Of DataGridRowEventArgs) 

事件類型

備註

為了改善效能, EnableRowVirtualization 屬性預設會設定為 trueEnableRowVirtualization當 屬性設定為 true 時, DataGrid 不會為系結資料來源中的每個資料項目具現化 DataGridRow 物件。 相反地,只有在 DataGrid 需要物件時才會建立 DataGridRow 物件,並盡可能重複使用它們。 例如,會 DataGrid 針對目前處於檢視中的每個資料項目建立 DataGridRow 物件,並在資料列向外捲動時回收資料列。

此事件可讓您在使用資料列之前,對資料列進行任何必要的變更。 若要在重複使用資料列之前復原這些自訂專案,請處理 UnloadingRow 事件。

適用於

另請參閱