LineStyle

LineStyle enumeration

指定a的线条样式Border.

public enum LineStyle

价值观

姓名价值描述
None0
Single1
Thick2
Double3
Hairline5
Dot6
DashLargeGap7
DotDash8
DotDotDash9
Triple10
ThinThickSmallGap11
ThickThinSmallGap12
ThinThickThinSmallGap13
ThinThickMediumGap14
ThickThinMediumGap15
ThinThickThinMediumGap16
ThinThickLargeGap17
ThickThinLargeGap18
ThinThickThinLargeGap19
Wave20
DoubleWave21
DashSmallGap22
DashDotStroker23
Emboss3D24
Engrave3D25
Outset26
Inset27

例子

演示如何将边框包围的字符串插入到文档中。

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Font.Border.Color = Color.Green;
builder.Font.Border.LineWidth = 2.5d;
builder.Font.Border.LineStyle = LineStyle.DashDotStroker;

builder.Write("Text surrounded by green border.");

doc.Save(ArtifactsDir + "Border.FontBorder.docx");

也可以看看