ModulePage.Margin Property

Definition

Gets the default padding.

public:
 virtual property System::Windows::Forms::Padding Margin { System::Windows::Forms::Padding get(); };
public virtual System.Windows.Forms.Padding Margin { get; }
member this.Margin : System.Windows.Forms.Padding
Public Overridable ReadOnly Property Margin As Padding

Property Value

A Padding structure. The default values are (12, 12, 12, 12).

Examples

The following example writes margin settings to the trace listener.

Padding pd = this.Margin;
Trace.WriteLine("Left Margin: " + pd.Left.ToString()
+ "  R: " + pd.Right.ToString()
+ "  Top: " + pd.Top.ToString());

Remarks

The System.Windows.Forms.Padding structure is initialized to (12, 12, 12, 12). Override the Margin property and provide a set accessor to change the default value.

Applies to