System.Windows.Forms
2.0.0.0
System.ValueType
The structure represents the padding or margin associated with a rectangular UI element such as a control. The padding is the internal space between the body of the UI element and its edge. In contrast, a margin is the distance separating the adjoining edges of two adjacent UI elements. Because of structural similarities, is used to represent both padding and margins.
For a diagram that illustrates the and properties on a control, see Margin and Padding in Windows Forms Controls.
Padding has a different effect on controls that are containers than on controls that are not. For example, in a control, the property defines the spacing between the border of the and its child controls. For a control, the property defines the spacing between the border of the control and its contained text.
In addition to typical methods and properties, also defines the following type-level members:
-
The field, which represents a predefined with no padding.
-
A set of operators for performing common arithmetic operations for the class, such as adding two objects together. For languages that do not support operator overloading, you can invoke these members by using alternative method syntax.
-
The , , and properties, which provide combined values that are convenient for use in custom layout calculations.
Represents padding or margin information associated with a user interface (UI) element.
Constructor
This constructor sets the , , , and properties to the value of the parameter.
Initializes a new instance of the class using the supplied padding size for all edges.
The number of pixels to be used for padding for all edges.
2.0.0.0
Constructor
If all of the parameter values are equal, then the property will reflect this common value.
Initializes a new instance of the class using a separate padding size for each edge.
The padding size, in pixels, for the left edge.
The padding size, in pixels, for the top edge.
The padding size, in pixels, for the right edge.
The padding size, in pixels, for the bottom edge.
2.0.0.0
Method
System.Windows.Forms.Padding
To be added.
Computes the sum of the two specified values.
A that contains the sum of the two specified values.
A .
A .
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)
System.Int32
To be added.
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 , , , and properties.
Gets or sets the padding value for all the edges.
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)
System.Int32
To be added.
Setting this value can also alter the property.
Gets or sets the padding value for the bottom edge.
2.0.0.0
Field
System.Windows.Forms.Padding
An empty padding object is defined as having the , , and padding properties set to 0.
This immutable field is useful for comparison operations and initializations.
Provides a object with no padding.
2.0.0.0
Method
System.Boolean
Only other objects of type (or a derived type) can be equal to the current . In addition, the corresponding , , and properties for both objects must be the same.
Determines whether the value of the specified object is equivalent to the current .
true if the objects are equivalent; otherwise, false.
The object to compare to the current .
2.0.0.0
Method
System.Int32
The method uses the , , , and values to generate a 32-bit hash code that represents the current .
A hash code is a number that corresponds to the value of an object (so two objects that have the same value should generate the same hash code). Hash codes are used to sort and store collections of objects. For example, a represents a collection of key-and-value pairs that are organized based on the hash code of the key.
For more information on hash codes and hash functions, see the method.
Generates a hash code for the current .
A 32-bit signed integer hash code.
2.0.0.0
Property
System.ComponentModel.Browsable(false)
System.Int32
To be added.
This property is convenient for use in many layout calculations.
Gets the combined padding for the right and left edges.
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)
System.Int32
To be added.
Setting this value can also alter the property.
Gets or sets the padding value for the left edge.
2.0.0.0
Method
System.Windows.Forms.Padding
A vector addition operation is the result of adding the padding values for each edge. For example, the property of the result is the sum of the properties of the two operands.
This operation is transitive.
Performs vector addition on the two specified objects, resulting in a new .
A new that results from adding and .
The first to add.
The second to add.
2.0.0.0
Method
System.Boolean
Two objects are equal if the padding values for each of the four edges – , , , and – are the same for both objects.
Tests whether two specified objects are equivalent.
true if the two objects are equal; otherwise, false.
A to test.
A to test.
2.0.0.0
Method
System.Boolean
This operation is the inverse of .
Tests whether two specified objects are not equivalent.
true if the two objects are different; otherwise, false.
A to test.
A to test.
2.0.0.0
Method
System.Windows.Forms.Padding
A vector subtraction operation is the result of subtracting the padding values for each edge. For example, the property of the result is the difference between the properties of two operands.
Performs vector subtraction on the two specified objects, resulting in a new .
The result of subtracting from .
The to subtract from (the minuend).
The to subtract from (the subtrahend).
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)
System.Int32
To be added.
Setting this value can also alter the property.
Gets or sets the padding value for the right edge.
2.0.0.0
Property
System.ComponentModel.Browsable(false)
System.Drawing.Size
To be added.
The property performs a type conversion from to . The property corresponds to the property, and the property corresponds to the property.
is convenient for use in many layout calculations.
Gets the padding information in the form of a .
2.0.0.0
Method
System.Windows.Forms.Padding
To be added.
Subtracts one specified value from another.
A that contains the result of the subtraction of one specified value from another.
A .
A .
2.0.0.0
Property
System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)
System.Int32
To be added.
Setting this value can also alter the property.
Gets or sets the padding value for the top edge.
2.0.0.0
Method
System.String
This method returns a string containing the labeled values of the padding for all four edges.
This method overrides .
Returns a string that represents the current .
A that represents the current .
2.0.0.0
Property
System.ComponentModel.Browsable(false)
System.Int32
To be added.
This property is convenient for use in many layout calculations.
Gets the combined padding for the top and bottom edges.
2.0.0.0
System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.PaddingConverter))