Padding 构造函数

定义

初始化 Padding 类的新实例。

重载

Padding(Int32)

初始化 Padding 类的新实例,对所有边缘使用提供的空白大小。

Padding(Int32, Int32, Int32, Int32)

初始化 Padding 类的新实例,对每个边缘使用各自的空白大小。

Padding(Int32)

初始化 Padding 类的新实例,对所有边缘使用提供的空白大小。

C#
public Padding (int all);

参数

all
Int32

要用于所有边缘的空白的像素数目。

注解

此构造函数将Right参数LeftBottomTop的值allAll属性设置为值。

另请参阅

适用于

.NET Framework 4.8 和其他版本
产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

Padding(Int32, Int32, Int32, Int32)

初始化 Padding 类的新实例,对每个边缘使用各自的空白大小。

C#
public Padding (int left, int top, int right, int bottom);

参数

left
Int32

左边缘的空白大小(以像素为单位)。

top
Int32

上边缘的空白大小(以像素为单位)。

right
Int32

右边缘的空白大小(以像素为单位)。

bottom
Int32

下边缘的空白大小(以像素为单位)。

注解

如果所有参数值都相等,则该 All 属性将反映此通用值。

另请参阅

适用于

.NET Framework 4.8 和其他版本
产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7