DataGridCheckBoxColumn.PrepareCellForEdit 方法

定義

在資料行中的儲存格進入編輯模式時呼叫。

protected:
 override System::Object ^ PrepareCellForEdit(System::Windows::FrameworkElement ^ editingElement, System::Windows::RoutedEventArgs ^ editingEventArgs);
protected override object PrepareCellForEdit (System.Windows.FrameworkElement editingElement, System.Windows.RoutedEventArgs editingEventArgs);
override this.PrepareCellForEdit : System.Windows.FrameworkElement * System.Windows.RoutedEventArgs -> obj
Protected Overrides Function PrepareCellForEdit (editingElement As FrameworkElement, editingEventArgs As RoutedEventArgs) As Object

參數

editingElement
FrameworkElement

資料行針對處於編輯模式之儲存格所顯示的項目。

editingEventArgs
RoutedEventArgs

讓儲存格進入編輯模式之使用者筆勢的相關資訊。

傳回

Object

未編輯的值。

備註

DataGrid 衍生自 DataGridColumn 的資料行中的資料格進入編輯模式時,控制項會呼叫 PrepareCellForEdit 方法。 類別 DataGridCheckBoxColumn 會覆寫這個方法,藉由更新託管 CheckBox 控制項中的值,立即回應使用者手勢。 這是必要的立即回應,因為 DataGridCheckBoxColumn 儲存格會使用相同的使用者手勢進入編輯模式,以變更其裝載 CheckBox 的狀態。

適用於