Hi,
There is no official support for custom shapes yet in the MVC control, but this should work:
// on client side
Sys.Application.add_init(function (sender, args)
{
new MindFusion.Diagramming.Shape({
outline: 'A50,50,50,0,6.28318530717959,0 Z',
decoration: 'M15,15 L85,15 L85,85 L15,85 L15,15 Z',
id: 'CircledRect' });
});
// on the server
Shape shape = new Shape(
new ElementTemplate[]
{
new ArcTemplate(0, 0, 100, 100, 0f, 360f)
},
new ElementTemplate[]
{
new LineTemplate(15, 15, 85, 15),
new LineTemplate(85, 15, 85, 85),
new LineTemplate(85, 85, 15, 85),
new LineTemplate(15, 85, 15, 15)
},
new ElementTemplate[]
{
new LineTemplate(-20, 100, 140, 100),
new LineTemplate(140, 100, 140, 140),
new LineTemplate(140, 140, -20, 140),
new LineTemplate(-20, 140, -20, 100)
},
FillMode.Winding, "CircledRect"
);
Make sure the server-side shape definition comes before any FromJson calls.
I hope that helps,
Stoyan