A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/c-sharp/how-to-set-the-margin-of-the-buttons-in-c-sharp/ below:

How to set the Margin of the Buttons in C#?

How to set the Margin of the Buttons in C#?

Last Updated : 26 Jun, 2019

A Button is an essential part of an application, or software, or webpage. It allows the user to interact with the application or software. In Button, you are allowed to set the space between two or more Button controls using

Margin Property

. You can use this property in two different methods:

1. Design-Time:

It is the easiest method to set the margin between two button controls. Using the following steps:

Run-Time:

It is a little bit trickier than the above method. In this method, you can set the Margin property of the Button programmatically with the help of given syntax:

public System.Windows.Forms.Padding Margin { get; set; }

Here, the Padding is used to represent the space between controls. Following steps are used to set the Margin property of the Button:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4