DataGridColumn.GenerateElement(DataGridCell, Object) 方法

定義

在衍生類別中覆寫時,取得繫結至資料行之 Binding 屬性值的唯讀項目。

protected:
 abstract System::Windows::FrameworkElement ^ GenerateElement(System::Windows::Controls::DataGridCell ^ cell, System::Object ^ dataItem);
protected abstract System.Windows.FrameworkElement GenerateElement (System.Windows.Controls.DataGridCell cell, object dataItem);
abstract member GenerateElement : System.Windows.Controls.DataGridCell * obj -> System.Windows.FrameworkElement
Protected MustOverride Function GenerateElement (cell As DataGridCell, dataItem As Object) As FrameworkElement

參數

cell
DataGridCell

將會包含已產生之項目的儲存格。

dataItem
Object

由資料列 (內含所要的儲存格) 表示的資料項目。

傳回

FrameworkElement

繫結至資料行之 Binding 屬性值的新唯讀項目。

備註

這個方法會在儲存格處於顯示模式時,為儲存格內容建立視覺化樹狀結構。

適用於

另請參閱