Hi,
Routable connectors appearance is indeed determined by their stroke style, as 1D shapes do not have a filling. A possible workaround is to use a 2D connector, for example an arrow shape and apply a gradient fill style to it. The attached image shows an arrow shape with a gradient fill style. To create the diagram shown in the image, you can use the following sample code:
// Create a basic shapes factory
NBasicShapesFactory factory = new NBasicShapesFactory(document);
factory.DefaultSize = new NSizeF(150, 100);
// Use the factory to create two shapes
NShape shape1 = factory.CreateShape(BasicShapes.Rectangle);
shape1.Location = new NPointF(20, 20);
document.ActiveLayer.AddChild(shape1);
NShape shape2 = factory.CreateShape(BasicShapes.Rectangle);
shape2.Location = new NPointF(420, 20);
document.ActiveLayer.AddChild(shape2);
// Create a 2D arrow shape filled with a gradient and use it as a connector
NArrowShape arrow = new NArrowShape(ArrowType.SingleArrow, new NPointF(0, 0), new NPointF(100, 0), 10, 30, 60);
NStyle.SetFillStyle(arrow, new NGradientFillStyle(GradientStyle.Vertical, GradientVariant.Variant1, Color.Red, Color.Blue));
document.ActiveLayer.AddChild(arrow);
arrow.FromShape = shape1;
arrow.ToShape = shape2;
document.SizeToContent();
Best Regards,
Nevron Support Team