Setting 'Fill' to a gradient

Jun 15, 2016 at 7:42 PM
Hi. I am creating an SvgCircle
                SvgCircle circle = new SvgCircle()
                {
                    ID = "theCircle" + DateTime.Now.Second.ToString(),
                    CenterX = int.Parse(LocationXEdit.Text),
                    CenterY = int.Parse(LocationYEdit.Text),
                    Radius = int.Parse(RadiusEdit.Text),
                    Stroke = new SvgColourServer(Color.Black),
                    StrokeWidth = 2,
                    Fill= new SvgColourServer(Color.Crimson)
                };
No problem adding the circle to my svg. However, I would like to assign a gradient rather than a solid color. In the past I have used javascript to add an element
circle.setAttribute("fill", "url(#gradRed)");
where gradRed is the id of a gradient in the <defs>.

Is there a way to achieve this?

Thanks,
Ed