InsertHorizontalRule
DocumentBuilder.InsertHorizontalRule method
将水平标尺形状插入文档中。
public Shape InsertHorizontalRule()
返回值
水平尺的形状。
例子
演示如何插入水平标尺形状并自定义其格式。
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);
也可以看看
- class Shape
- class DocumentBuilder
- 命名空间 Aspose.Words
- 部件 Aspose.Words