officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-shapeline.md
Allows you to specify fill options for a line and a shape’s border.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
LineFillFormat Fill { get; }
ReadOnly Property Fill As LineFillFormat
| Type | Description |
|---|---|
| LineFillFormat |
An object that contains line fill settings.
|
Use the Fill property to access fill settings that allow you to customize a shape line’s appearance.
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.
// 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();
' 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()
Use the Shape.Line.Fill.SetSolidFill method to apply a color to a line.
// 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;
' 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
Use the Shape.Line.Fill.SetGradientFill method to fill a line with a gradient of two or more colors.
// 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;
' 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