DataGrid.CurrentCell 属性

定义

获取或设置具有焦点的单元格。Gets or sets the cell that has focus.

public:
 property System::Windows::Controls::DataGridCellInfo CurrentCell { System::Windows::Controls::DataGridCellInfo get(); void set(System::Windows::Controls::DataGridCellInfo value); };
public System.Windows.Controls.DataGridCellInfo CurrentCell { get; set; }
member this.CurrentCell : System.Windows.Controls.DataGridCellInfo with get, set
Public Property CurrentCell As DataGridCellInfo

属性值

DataGridCellInfo

有关具有焦点的单元格的信息。Information about the cell that has focus.

注解

返回的值是一个结构,它提供有关单元的信息以及与该单元格关联的数据项。The value returned is a structure that provides information about the cell and the data item associated with the cell. 它不是对容器的实际引用 DataGridCellIt is not an actual reference to the DataGridCell container.

若要设置所选单元格的属性,可以在属性中设置触发器 CellStyleTo set properties on the selected cells, you can set a trigger in the CellStyle property. 有关详细信息,请参阅 CellStyleFor more information, see CellStyle.

适用于

另请参阅