HorizontalRuleFormat
HorizontalRuleFormat class
表示水平规则格式。
要了解更多信息,请访问使用形状文档文章。
public class HorizontalRuleFormat
特性
姓名 | 描述 |
---|---|
Alignment { get; set; } | 获取或设置水平规则的对齐方式。 |
Color { get; set; } | 获取或设置填充水平规则的画笔颜色。 |
Height { get; set; } | 获取或设置水平规则的高度。 |
NoShade { get; set; } | 表示水平线存在 3D 阴影。 如果真的 ,则水平线不带 3D 阴影,并使用纯色。 |
WidthPercent { get; set; } | 获取或设置指定水平规则的长度,以窗口宽度的百分比表示。 |
例子
展示如何插入水平线形状并自定义其格式。
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.InsertHorizontalRule();
HorizontalRuleFormat horizontalRuleFormat = shape.HorizontalRuleFormat;
horizontalRuleFormat.Alignment = HorizontalRuleAlignment.Center;
horizontalRuleFormat.WidthPercent = 70;
horizontalRuleFormat.Height = 3;
horizontalRuleFormat.Color = Color.Blue;
horizontalRuleFormat.NoShade = true;
Assert.True(shape.IsHorizontalRule);
Assert.True(shape.HorizontalRuleFormat.NoShade);
也可以看看
- 命名空间 Aspose.Words.Drawing
- 部件 Aspose.Words