TextureIndex

TextureIndex enumeration

Gölgeleme dokusunu belirtir.

public enum TextureIndex

değerler

İsimDeğerTanım
Texture10Percent3
Texture12Pt5Percent37
Texture15Percent38
Texture17Pt5Percent39
Texture20Percent4
Texture22Pt5Percent40
Texture25Percent5
Texture27Pt5Percent41
Texture2Pt5Percent35
Texture30Percent6
Texture32Pt5Percent42
Texture35Percent43
Texture37Pt5Percent44
Texture40Percent7
Texture42Pt5Percent45
Texture45Percent46
Texture47Pt5Percent47
Texture50Percent8
Texture52Pt5Percent48
Texture55Percent49
Texture57Pt5Percent50
Texture5Percent2
Texture60Percent9
Texture62Pt5Percent51
Texture65Percent52
Texture67Pt5Percent53
Texture70Percent10
Texture72Pt5Percent54
Texture75Percent11
Texture77Pt5Percent55
Texture7Pt5Percent36
Texture80Percent12
Texture82Pt5Percent56
Texture85Percent57
Texture87Pt5Percent58
Texture90Percent13
Texture92Pt5Percent59
Texture95Percent60
Texture97Pt5Percent61
TextureCross24
TextureDarkCross18
TextureDarkDiagonalCross19
TextureDarkDiagonalDown16
TextureDarkDiagonalUp17
TextureDarkHorizontal14
TextureDarkVertical15
TextureDiagonalCross25
TextureDiagonalDown22
TextureDiagonalUp23
TextureHorizontal20
TextureNone0
TextureSolid1
TextureVertical21
TextureNil65535Mevcut gölgeli bölge üzerinde herhangi bir desen kullanılmayacağını belirtir (yani desen, arka plan rengiyle tam bir dolgu olacaktır).

Örnekler

Metnin kenarlıklar ve gölgelendirmeyle nasıl süsleneceğini gösterir.

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

BorderCollection borders = builder.ParagraphFormat.Borders;
borders.DistanceFromText = 20;
borders[BorderType.Left].LineStyle = LineStyle.Double;
borders[BorderType.Right].LineStyle = LineStyle.Double;
borders[BorderType.Top].LineStyle = LineStyle.Double;
borders[BorderType.Bottom].LineStyle = LineStyle.Double;

Shading shading = builder.ParagraphFormat.Shading;
shading.Texture = TextureIndex.TextureDiagonalCross;
shading.BackgroundPatternColor = Color.LightCoral;
shading.ForegroundPatternColor = Color.LightSalmon;

builder.Write("This paragraph is formatted with a double border and shading.");
doc.Save(ArtifactsDir + "DocumentBuilder.ApplyBordersAndShading.docx");

Bir tabloya anahat kenarlığının nasıl uygulanacağını gösterir.

Document doc = new Document(MyDir + "Tables.docx");
Table table = doc.FirstSection.Body.Tables[0];

// Tabloyu sayfanın ortasına hizalayın.
table.Alignment = TableAlignment.Center;

// Tablodaki mevcut sınırları ve gölgeleri temizleyin.
table.ClearBorders();
table.ClearShading();

// Tablonun ana hatlarına yeşil kenarlıklar ekleyin.
table.SetBorder(BorderType.Left, LineStyle.Single, 1.5, Color.Green, true);
table.SetBorder(BorderType.Right, LineStyle.Single, 1.5, Color.Green, true);
table.SetBorder(BorderType.Top, LineStyle.Single, 1.5, Color.Green, true);
table.SetBorder(BorderType.Bottom, LineStyle.Single, 1.5, Color.Green, true);

// Hücreleri açık yeşil düz renkle doldurun.
table.SetShading(TextureIndex.TextureSolid, Color.LightGreen, Color.Empty);

doc.Save(ArtifactsDir + "Table.SetOutlineBorders.docx");

Ayrıca bakınız