Changing the look of selected symbol

Hi

I would like to change the representation for a selected symbol, we don't like the squares around it and we want to draw it otherwise, let’s say square with red background.

How can we do it?

1 Reply

MF Meera Fathima Syncfusion Team June 13, 2007 12:05 PM UTC


Hello Barak Suberri,

If your intension is to change the color of the outline bounding rectangle, you can do this by customizing the view class and overriding the DrawHandles() method, creating your own HandleRenderer.OutlineBoundingRectangle()and using this method within the view class DrawHandles() override method.

I have created a sample that shows how to achieve this functionality. You can get the sample from the following link - http://websamples.syncfusion.com/samples/Diagram.Windows/F62330/main.htm

Sample Details :

1. Uses custom diagram control (MyDiagram.cs) and CustomView (MyView.cs) classes.

2. Uses custom HandleRenderer class (MyHandleRenderer.cs ) that has its own OutlineBoundingRectangle() method. i.e. MyOutlineBoundingRectangle() method within which you can provide your desired color for the outline bounding rectangle.

3. The MyView.DrawHandles() method uses MyHandleRenderer.MyOutlineBoundingRectangle() instead of the default handlerenderer.

Similar you can change the color of selection handles and etc., by implementing the corresponding methods with your implementation within the custom handlerenderer class. Referring to the C:\Program Files\Syncfusion\Essential Studio\5.1.0.51\Base\Diagram.Base\Src\Utility\HandleRenderer class will give you an idea about how to go with this.

Please look into the sample and the details provided above and let me know whether this helps you.

Thank you for using Syncfusion products.

Best Regards,
Meera.


Loader.
Up arrow icon