InsertHorizontalRule

DocumentBuilder.InsertHorizontalRule method

Inserta una forma de regla horizontal en el documento.

public Shape InsertHorizontalRule()

Valor_devuelto

La forma que es una regla horizontal.

Ejemplos

Muestra cómo insertar una forma de regla horizontal y personalizar su formato.

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

Ver también