Back to Devexpress

LineFillFormat Interface

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-48930005.md

latest4.7 KB
Original Source

LineFillFormat Interface

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

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public interface LineFillFormat
vb
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.

csharp
// 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();
vb
' Create a rectangle.
Dim rectangle As Shape = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, New RectangleF(300, 200, 500, 300))
rectangle.Fill.SetSolidFill(Color.FromArgb(&HFF, &HEE, &HAD))
' 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.

csharp
// 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;
vb
' Create a rectangle.
Dim rectangle As Shape = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, New RectangleF(300, 200, 500, 300))
rectangle.Fill.SetNoFill()
' Format the rectangle's outline.
Dim border As ShapeLine = rectangle.Line
' Fill the outline with a color.
border.Fill.SetSolidFill(Color.FromArgb(&H4D, &H64, &H8D))
' 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.

csharp
// 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;
vb
' Create a rectangle.
Dim rectangle As Shape = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, New RectangleF(300, 200, 500, 300))
rectangle.Fill.SetNoFill()
' Format the rectangle's outline.
Dim border As ShapeLine = rectangle.Line
' Apply a gradient of two colors to the outline.
border.Fill.SetGradientFill(GradientType.Linear, Color.FromArgb(&H4D, &H64, &H8D), Color.FromArgb(&HFF, &H8B, &H94))
' Set the line width.
border.Thickness = 6

See Also

LineFillFormat Members

DevExpress.XtraRichEdit.API.Native Namespace