I want to manipulate selection in WPF datagrid, but I have problem with access to actual cells and setting focus on them and marking them as selected.
Answer to question 1: A quick way to get DataGridCell from DataGridCellInfo:
public DataGridCell GetDataGridCell(DataGridCellInfo cellInfo) { var cellContent = cellInfo.Column.GetCellContent(cellInfo.Item); if (cellContent != null) return (DataGridCell) cellContent.Parent; return null; }