I use this part of code to add the picture but it's half the cell...and still it's not working.
PictureBox pB = new PictureBox {
Size = MaximumSize,
Dock = DockStyle.Fill,
BackgroundImageLayout = ImageLayout.Stretch
};
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK) {
string path = ofd.FileName;
pB.Image = new Bitmap(path);
}
tableLayoutPanel1.Controls.Add(pB, x-1, y-1);
Control control = tableLayoutPanel1.GetControlFromPosition(x - 1, y - 1);
control.Dock = DockStyle.Fill;
control.BackgroundImageLayout = ImageLayout.Stretch;