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.
Unfortunately, activation email could not send to your email. Please try again.

Symbol resizing

Thread ID:

Created:

Updated:

Platform:

Replies:

18643 Sep 6,2004 04:18 AM Oct 14,2004 01:19 PM Windows Forms 4
loading
Tags: Diagram
Georg Schmidt
Asked On September 6, 2004 04:18 AM

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

Administrator [Syncfusion]
Replied On September 8, 2004 08:29 AM

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

Administrator [Syncfusion]
Replied On October 14, 2004 06:38 AM

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 >

Administrator [Syncfusion]
Replied On October 14, 2004 08:33 AM

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

Administrator [Syncfusion]
Replied On October 14, 2004 01:19 PM

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 >

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.

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.

;