We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing the look of selected symbol

Thread ID:

Created:

Updated:

Platform:

Replies:

62330 Jun 13,2007 09:31 AM UTC Jun 13,2007 12:05 PM UTC WinForms 1
loading
Tags: Diagram
barak suberri
Asked On June 13, 2007 09:31 AM UTC

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?

Meera Fathima [Syncfusion]
Replied On 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.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;