InsertHorizontalRule

DocumentBuilder.InsertHorizontalRule method

Insère une forme de règle horizontale dans le document.

public Shape InsertHorizontalRule()

Return_Value

La forme qui est une règle horizontale.

Exemples

Montre comment insérer une forme de règle horizontale et personnaliser sa mise en forme.

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);

Voir également