Padding.All Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the padding value for all the edges.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public int All { get; set; }

Property Value

Type: System.Int32

The padding, in pixels, for all edges if the same; otherwise, -1.

When retrieving this property, if all the edges use the same padding value, then this common value is returned. Otherwise, -1 is returned to indicate that all the padding values are not equal.

Setting this value changes the Right, Left, Bottom, and Top properties.

.NET Framework
Available since 2.0
Return to top