Hello Rajkumar,
There are two ways to do this:
1) Use regular RadDiagramShape with custom style and an attached property for the circle's color (if you want to be able to use different colors)
2) use custom RadDiagramShape with custom style and an additional dependency property for the color.
I've attached a sample project so could you please examine it and see if this is what you're looking for.
Regards,
Zarko
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
ok my custom shape is based on RectangleGeometry and EllipseGeometry.
var p = new PathGeometry();
var r = new RectangleGeometry(new Rect(new Point(0, 0), new Size(W, H)));
p.AddGeometry(r);
p.AddGeometry(new EllipseGeometry(new Point(0, 0),R,R);
Geometry = p;
Now, I need different colours for rectangle and ellipse.
How do I achieve this ?
0
Zarko
Telerik team
answered on 11 Aug 2014, 03:43 PM
Hello Rajkumar,
Unfortunately you can't have different colours for the ellipse and the geometry in this scenario because they are drawn by a single Path (its Data property is bound to the Geometry property) and they'll use the colour from its Fill property.
In order to have two different colours you'll have to use one of the methods that I suggested in my previous reply.
Regards,
Zarko
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.