InsertHorizontalRule
DocumentBuilder.InsertHorizontalRule method
Infogar en horisontell regelform i dokumentet.
public Shape InsertHorizontalRule()
Returvärde
Formen som är en horisontell regel.
Exempel
Visar hur man infogar en horisontell regelform och anpassar dess formatering.
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);
Se även
- class Shape
- class DocumentBuilder
- namnutrymme Aspose.Words
- hopsättning Aspose.Words