How I can set my color for shape in RadDiagramToolbox? I want shapes to be drawn in white in RadDiagramToolbox.
3 Answers, 1 is accepted
Pavel R. Pavlov
answered on 05 Apr 2013, 03:50 PM
I am not sure that I understand your scenario. Can you please elaborate more on how you load the items to the RadDiagramToolbox control? If you create your custom collection then you are able to control the background color of the shapes that you add.
In case that you use our HierarchicalGalleryItemsCollection you are allowed to change the color of the shapes in the RadDiagramToolbox control by changing the theme of your application. Please take a look at the themes that we provide and see if some fits your requirements.
The easiest way to do this is to create your own toolbox hierarchy using our Galleriy and GalleryItem classes and just set the Shape property of the items to your custom shapes (it has to derive from RadDiagramShapeBase).
I've attached a sample project demonstrating two ways to use images in your diagram - a custom shape with custom template (ImageShape.cs) and an ordinary shape whose content is an Image so could you please examine it and if you have more questions feel free to ask.
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).