DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs) DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs) DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs) DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs) Method

定義

在衍生類別中覆寫時,根據編輯需要來設定儲存格內容。When overridden in a derived class, sets cell content as needed for editing.

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

參數

editingElement
FrameworkElement FrameworkElement FrameworkElement FrameworkElement

資料行針對處於編輯模式之儲存格所顯示的項目。The element that the column displays for a cell in editing mode.

editingEventArgs
RoutedEventArgs RoutedEventArgs RoutedEventArgs RoutedEventArgs

讓儲存格進入編輯模式之使用者筆勢的相關資訊。Information about the user gesture that is causing a cell to enter editing mode.

傳回

由衍生類別傳回時未編輯的儲存格值。When returned by a derived class, the unedited cell value. 此實作在所有情況下都會傳回 nullThis implementation returns null in all cases.

備註

衍生的資料行類型會覆寫這個方法,以回應所指示editingEventArgs的使用者手勢,並在編輯之前傳回目前的值。Derived column types override this method to respond to the user gesture that is indicated by editingEventArgs and to return the current value before editing.

適用於

另請參閱