How can "solid" margins be made around System.Windows.Forms.Button control?
var button = new System.Windows.Forms.Button();
button.Dock = DockStyle.Fill;
button.Margin = new Padding(20);
var panel = new System.Windows.Forms.Panel();
panel.Controls.Add(button);
In the example above the button won't have any margins within the container panel.
Is it somehow possible to implement so the button would have 20px space around it but still behave like an ordinary Button (e.g. inherit from System.Windows.Forms.Button class and do some custom draw)?
Edit: Let me explain what I am trying to do. I would like to have such button control which would have ".Dock = DockStyle.Right" property set. Also it would have padding on the left. Thus, having few such buttons on the panel would stack them to the right of the panel. Why for? E.g. I have 3 such buttons stacked to the right. In some cases I would like to hide middle one. I would set it's property ".Visibile = false" so it is hidden. In this case the rightmost button would stack to the leftmost having the same space between them.