I have a data model that I'm trying to draw in a Diagram. I'm having some success with a custom shape class something like below. MyModelElement has X, Y, W, H & Text as well as other model data. I'm getting the bounding box in a different location to my visible shape, and it's always 100x100. I tried adding
in the RadDiagramShape creation below, but didn't change anything. Any help appreciated.
My code to populate the diagram is similar to below.
var elementShape =
var shape =
Text = element.Text,
ElementShape = elementShape,
ForeColor = Color.Black,
My custom shape class
MYElementShape : ElementShape
_element = element;
GraphicsPath CreatePath(Rectangle bounds)
GraphicsPath path =
Rectangle(_element.X, _element.Y, _element.W, _element.H));