.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
A newer version of this page is available.

Shape.Fill Property

Gets fill formatting properties for the specified shape.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

ShapeFill Fill { get; }
ReadOnly Property Fill As ShapeFill

Property Value

Type Description
ShapeFill

A ShapeFill object that contains fill formatting properties.

Remarks

The code sample below creates a text box and specifies its fill formatting properties.

Document document = server.Document;
document.AppendText("Line One\nLine Two\nLine Three");
Shape myTextBox = document.Shapes.InsertTextBox(document.CreatePosition(15));
myTextBox.HorizontalAlignment = ShapeHorizontalAlignment.Center;
// Specify the text box background color.
myTextBox.Fill.Color = System.Drawing.Color.WhiteSmoke;
// Draw a border around the text box.
myTextBox.Line.Color = System.Drawing.Color.Black;
myTextBox.Line.Thickness = 1;
// Modify text box content.
SubDocument textBoxDocument = myTextBox.TextBox.Document;
textBoxDocument.AppendText("TextBox Text");
CharacterProperties cp = textBoxDocument.BeginUpdateCharacters(textBoxDocument.Range.Start, 7);
cp.ForeColor = System.Drawing.Color.Orange;
cp.FontSize = 24;
textBoxDocument.EndUpdateCharacters(cp);
See Also