Back to Devexpress

LineFillFormat.SetSolidFill(Color) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-linefillformat-dot-setsolidfill-x28-system-dot-drawing-dot-color-x29.md

latest2.3 KB
Original Source

LineFillFormat.SetSolidFill(Color) Method

Applies a solid color to 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
void SetSolidFill(
    Color color
)
vb
Sub SetSolidFill(
    color As Color
)

Parameters

NameTypeDescription
colorColor

A color to fill a line.

|

Remarks

The example below shows how to specify a color for a rectangle’s outline.

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

See Also

SolidFill

LineFillFormat Interface

LineFillFormat Members

DevExpress.XtraRichEdit.API.Native Namespace