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

Смотрите также