Yes it is. You need to inherit from ComplexShape and implement the IExpandable interface.
The GraphicsPath (local to the shape) returned from the Expander method determines the location of the expander and this will automatically expand the shape if DrawExpand is set to true.
The following code will render an expander (_expandPath is the variable for the Expander property) :
private void RenderExpand(Graphics graphics, Render render)
{
//Obtain a reference to IExpandable interface
IExpandable expand = (IExpandable) this;
if (!expand.DrawExpand) return;
//Draw the expander
Pen pen = new Pen(Color.FromArgb(128,Color.Gray),1); SolidBrush brush = new SolidBrush(Color.White);
//Set up the expand path
_expandPath = new GraphicsPath();
_expandPath.AddEllipse(Width-20,5,14,14);
SmoothingMode smoothing = graphics.SmoothingMode;
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.FillPath(brush,_expandPath); //Fill Circle
graphics.DrawPath(pen,_expandPath); //Outline
pen.Color = Color.FromArgb(128,Color.Navy);
pen.Width = 2;
PointF[] points;
if (expand.Expanded)
{
points = new PointF[] {new PointF(Width-16,11),new PointF(Width-13,8),new PointF(Width-10,11)};
}
else
{
points = new PointF[] {new PointF(Width-16,8),new PointF(Width-13,11),new PointF(Width-10,8)};
}
graphics.DrawLines(pen,points);
points[0].Y += 5;
points[1].Y += 5;
points[2].Y += 5;
graphics.DrawLines(pen,points);
graphics.SmoothingMode = smoothing;
}