PatternType

PatternType enumeration

Specifies the fill pattern to be used to fill a shape.

public enum PatternType

Values

NameValueDescription
None-1No pattern.
Percent10110% of the foreground color.
Percent20220% of the foreground color.
Percent25325% of the foreground color.
Percent30430% of the foreground color.
Percent40540% of the foreground color
Percent50650% of the foreground color
Percent575% of the foreground color.
Percent60860% of the foreground color.
Percent70970% of the foreground color.
Percent751075% of the foreground color.
Percent801180% of the foreground color.
Percent901290% of the foreground color.
Cross13Cross.
DarkDownwardDiagonal14Dark downward diagonal.
DarkHorizontal15Dark horizontal.
DarkUpwardDiagonal16Dark upward diagonal.
DarkVertical17Dark vertical.
DashedDownwardDiagonal18Dashed downward diagonal.
DashedHorizontal19Dashed horizontal.
DashedUpwardDiagonal20Dashed upward diagonal.
DashedVertical21Dashed vertical.
DiagonalBrick22Diagonal brick.
DiagonalCross23Diagonal cross.
Divot24Pattern divot.
DottedDiamond25Dotted diamond.
DottedGrid26Dotted grid.
DownwardDiagonal27Downward diagonal.
Horizontal28Horizontal.
HorizontalBrick29Horizontal brick.
LargeCheckerBoard30Large checker board.
LargeConfetti31Large confetti.
LargeGrid32Large grid.
LightDownwardDiagonal33Light downward diagonal.
LightHorizontal34Light horizontal.
LightUpwardDiagonal36Light upward diagonal.
LightVertical37Light vertical.
NarrowHorizontal38Narrow horizontal.
NarrowVertical39Narrow vertical.
OutlinedDiamond40Outlined diamond.
Plaid41Plaid.
Shingle42Shingle.
SmallCheckerBoard43Small checker board.
SmallConfetti44Small confetti.
SmallGrid45Small grid.
SolidDiamond46Solid diamond.
Sphere47Sphere.
Trellis48Trellis.
UpwardDiagonal49Upward diagonal.
Vertical50Vertical.
Wave51Wave.
Weave52Weave.
WideDownwardDiagonal53Wide downward diagonal.
WideUpwardDiagonal54Wide upward diagonal.
ZigZag55Zig zag.

Examples

Shows how to set pattern for a shape.

Document doc = new Document(MyDir + "Shape stroke pattern border.docx");

Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Fill fill = shape.Fill;

Console.WriteLine("Pattern value is: {0}", fill.Pattern);

// There are several ways specified fill to a pattern.
// 1 -  Apply pattern to the shape fill:
fill.Patterned(PatternType.DiagonalBrick);

// 2 -  Apply pattern with foreground and background colors to the shape fill:
fill.Patterned(PatternType.DiagonalBrick, Color.Aqua, Color.Bisque);

doc.Save(ArtifactsDir + "Shape.FillPattern.docx");

See Also