Skip to main content

LineFillFormat Interface

Contains fill settings for a line or a shape’s border.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public interface LineFillFormat

The following members return LineFillFormat objects:

Remarks

Use the LineFillFormat object’s members to specify line fill options.

No Fill

Use the Shape.Line.Fill.SetNoFill method to remove a fill from a line.

The example below shows how to use the SetNoFill method to remove an outline from a rectangle.

Rich_ShapeLine_NoFill

// Create a rectangle.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
rectangle.Fill.SetSolidFill(Color.FromArgb(0xFF, 0xEE, 0xAD));
// Remove the rectangle's outline.
rectangle.Line.Fill.SetNoFill();

Solid Fill

Use the Shape.Line.Fill.SetSolidFill method to apply a color to a line.

Rich_ShapeLine_SolidFill

// Create a rectangle.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
rectangle.Fill.SetNoFill();
// Format the rectangle's outline.
ShapeLine border = rectangle.Line;
// Fill the outline with a color.
border.Fill.SetSolidFill(Color.FromArgb(0x4D, 0x64, 0x8D));
// Set the line width.
border.Thickness = 6;

Gradient Fill

Use the Shape.Line.Fill.SetGradientFill method to fill a line with a gradient of two or more colors.

Rich_ShapeLine_GradientFill

// Create a rectangle.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
rectangle.Fill.SetNoFill();
// Format the rectangle's outline.
ShapeLine border = rectangle.Line;
// Apply a gradient of two colors to the outline.
border.Fill.SetGradientFill(GradientType.Linear, Color.FromArgb(0x4D, 0x64, 0x8D), Color.FromArgb(0xFF, 0x8B, 0x94));
// Set the line width.
border.Thickness = 6;
See Also