Getting the selected element from DirectlyOver will return an IInputElement where the Parent is always null, therefore your second
if loop will never get entered. If you only want to get the selected row from the DoubleClickEvent then you can do this:
private void dgTitlesPendingListofTitles_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (sender != null)
{
DataGrid grid = sender as DataGrid;
if (grid != null && grid.SelectedItems != null && grid.SelectedItems.Count == 1)
{
DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
}
}
}
Hope this helps