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. Image for the cookie policy date
close icon

Symbol resizing

How do I control resizing of different shapes (Lines, RoundRect, ...) in a customized symbol? Thanks for help.

4 Replies

AD Administrator Syncfusion Team September 8, 2004 12:29 PM UTC

Hi Georg, The Model''s BoundsChanged event is fired whenever any node is resized and you can use this event to do what you are seeking. You can refer to the sample posted in this posting for more details. Regards, Arun


AD Administrator Syncfusion Team October 14, 2004 10:38 AM UTC

If I do not want to drag-move a link node(but let click to select it), How do I put code in (what) event ? Thanks, >Hi Georg, > >The Model''s BoundsChanged event is fired whenever any node is resized and you can use this event to do what you are seeking. > >You can refer to the sample posted in this posting for more details. > >Regards, >Arun >


AD Administrator Syncfusion Team October 14, 2004 12:33 PM UTC

Hi You can set the Link''s EditStyle.AllowMove property to false to prevent links from being moved. Here is a code snippet: //Custom Link protected Link CreateLink(PointF[] pts) { Link link = new Link(Link.Shapes.Line, pts); link.EndPoints.LastEndPointDecorator = new EndPointDecorator(EndPointVisuals.ClosedArrow); // Links cannot be moved link.EditStyle.AllowMove = false; return link; } //Create and Register the Link Tool for the custom link Tool linkTool = this.diagram1.Controller.GetTool("LinkTool"); ((LinkTool)linkTool).LinkFactory = new LinkFactory(this.CreateLink); this.diagram1.Controller.RegisterTool(linkTool); //Activate the Link Tool this.diagram1.ActivateTool("LinkTool"); Regards Arun


AD Administrator Syncfusion Team October 14, 2004 05:19 PM UTC

Thank you! It works. >Hi > >You can set the Link''s EditStyle.AllowMove property to false to prevent links from being moved. Here is a code snippet: > >//Custom Link >protected Link CreateLink(PointF[] pts) >{ >Link link = new Link(Link.Shapes.Line, pts); >link.EndPoints.LastEndPointDecorator = new EndPointDecorator(EndPointVisuals.ClosedArrow); >// Links cannot be moved >link.EditStyle.AllowMove = false; >return link; > >} > >//Create and Register the Link Tool for the custom link >Tool linkTool = this.diagram1.Controller.GetTool("LinkTool"); >((LinkTool)linkTool).LinkFactory = new LinkFactory(this.CreateLink); >this.diagram1.Controller.RegisterTool(linkTool); > >//Activate the Link Tool >this.diagram1.ActivateTool("LinkTool"); > >Regards >Arun >

Loader.
Live Chat Icon For mobile
Up arrow icon