DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs) 方法

定义

在派生类中重写时,根据需要设置单元格内容以供编辑。

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

列在编辑模式下为单元格显示的元素。

editingEventArgs
RoutedEventArgs

有关导致单元格进入编辑模式的用户手势的信息。

返回

当派生类返回时,未编辑的单元格值。 此实现在所有情况下都会 null 返回。

注解

派生列类型重写此方法,以响应用户手势,该手势由 editingEventArgs 用户指示并在编辑前返回当前值。

适用于

另请参阅