The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRShape.Shape Property

Gets or sets an object which determines a particular shape type along with its settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll


public ShapeBase Shape { get; set; }
Public Property Shape As ShapeBase

Property Value

Type Description

A ShapeBase class descendant which contains settings for a particular shape type.


There are numerous standard shape types supported by the XRShape class. To specify the shape's type set the Shape property to an appropriate descendant of the ShapeBase class (e.g. set this property to a ShapeArrow object to get an arrow). Then the Shape property will return an object that corresponds to a particular shape's type and contains all the properties required by this type.


This example demonstrates how to create an XRShape Arrow type control, and set its basic properties.

using System;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Shape;

private void button1_Click(object sender, EventArgs e) {
    XtraReport1 report = new XtraReport1();

    // Create a shape control.
    XRShape shape = new XRShape();

    // Set the shape's type to Arrow.
    shape.Shape = new ShapeArrow();

    // Adjust the Arrow shape's main properties.
    shape.Angle = 90;
    shape.Width = 200;
    shape.Height = 200;
    shape.ForeColor = Color.Brown;
    shape.FillColor = Color.Beige;
    shape.Stretch = false;

    // Adjust the Arrow shape's specific properties.
    ((ShapeArrow)shape.Shape).ArrowHeight = 50;
    ((ShapeArrow)shape.Shape).ArrowWidth = 50;
    ((ShapeArrow)shape.Shape).Fillet = 20;

    // Preview the report.
    ReportPrintTool pt = new ReportPrintTool(report);
See Also