/// protected override List <AutomationPeer> GetChildrenCore() { AutomationPeer wrapperPeer = OwningRowPeer; if (wrapperPeer != null) { // We need to update children manually since wrapperPeer is not in the Automation Tree // When containers are recycled the visual (DataGridRow) will point to a new item. // WrapperPeer's children are the peers for DataGridRowHeader, DataGridCells and DataGridRowDetails. wrapperPeer.ResetChildrenCache(); return(wrapperPeer.GetChildren()); } return(GetCellItemPeers()); }