I'm creating a windows form that will programatically add a panel to another panel. I'm trying to customize the various properties of the new panel, such as color, and size, which works. However when I try to modify the margin, nothing works. I cannot find the Thickness
struct either, since it's not a WPF app, it's a Windows Forms Application. Here is my code:
private void buttonAddExercise_Click(object sender, EventArgs e)
{
Panel panel = new Panel();
panel.BackColor = Color.White;
panel.Size = new Size(200, 300);
panel.Margin = new Padding(20);
listOfExercisePanels.Add(panel);
panelNewWorkout.Controls.Add(panel);
}