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.

Winforms Control on a Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

17535 Aug 11,2004 04:47 AM Apr 15,2005 10:25 AM Windows Forms 17
loading
Tags: Diagram
Baddabing
Asked On August 11, 2004 04:47 AM

Hi, I''m tasked with evaluating Diagram for a possible utility for my company. Could you use Diagram to place custom Winform controls on a diagram instead of just drawing symbols? In other words can a control be placed on a diagram? How would one go about that? Many thanks, JohnB

Administrator [Syncfusion]
Replied On August 11, 2004 08:57 AM

Hi John, Essential Diagram at present does not have built-in support for hosting Windows Forms controls in a diagram. We already have a very high priority feature request on this issue and will definitely add the functionality for ''Control container'' Symbols in a future version of the product. However, one option that you could pursue for the time being would be to implement the Control creation/management functionality inside your application and map these controls to corresponding symbols on the diagram. While this approach will not be the exact equivalent of having native control-type symbols, it would provide functionality that closely resembles it. All you would have to do is subscribe to Diagram events that would notify you when the Symbol was created (Diagram.Model.ChildrenChanging/ChildrenChangeComplete), create and map your control to the symbol and use the Symbol''s bounds to add it to the Diagram control instance. You can then handle the Diagram.Model.BoundsChanged and Moved events to size/move the control with it''s parent symbol. It should be fairly simple to implement something along these lines and our support engineers will be happy to guide you with the details. Please let us know if any additional clarification is required. Regards, Prakash Surendra Syncfusion, Inc

Baddabing
Replied On August 11, 2004 10:39 PM

Thank you for your reply >Hi John, > >Essential Diagram at present does not have built-in support for hosting Windows Forms controls in a diagram. We already have a very high priority feature request on this issue and will definitely add the functionality for ''Control container'' Symbols in a future version of the product. > >However, one option that you could pursue for the time being would be to implement the Control creation/management functionality inside your application and map these controls to corresponding symbols on the diagram. While this approach will not be the exact equivalent of having native control-type symbols, it would provide functionality that closely resembles it. All you would have to do is subscribe to Diagram events that would notify you when the Symbol was created (Diagram.Model.ChildrenChanging/ChildrenChangeComplete), create and map your control to the symbol and use the Symbol''s bounds to add it to the Diagram control instance. You can then handle the Diagram.Model.BoundsChanged and Moved events to size/move the control with it''s parent symbol. It should be fairly simple to implement something along these lines and our support engineers will be happy to guide you with the details. > >Please let us know if any additional clarification is required. > >Regards, >Prakash Surendra >Syncfusion, Inc

Administrator [Syncfusion]
Replied On August 12, 2004 04:52 PM

Hi John, Following up on Prakash''s posting, here is a sample. In this sample a custom symbol called MySymbol with a button is added to the Diagram when you click on the Add MySymbol button. The main points are: - There is a custom Symbol class called MySymbol which consists of a outer Rectangle and an Ellipse. - This Symbol is added to the Diagram using a InsertNodesCmd by clicking on the Add MySymbol button. - In the Diagram''s ChildrenChangeComplete event, which is fired soon after MySymbol is added, a button is added to the Diagram within the bounds of the symbol. This button is centered within MySymbol and a click event is added for the button. - In the Model''s Moved event which is fired when any node in Diagram is moved, the button is repositioned within the bounds of the new location of MySymbol. - In the Model''s BoundsChanged event which is fired whenever any node is resized, the button is centered according to the new size of MySymbol. - The Button click event is fired when any button with MySymbol is clicked. Clicking it shows a messagebox with the name of the Symbol whose button was clicked. Do not hesitate to contact us if you have any further questions. Regards Arun

Administrator [Syncfusion]
Replied On August 14, 2004 01:49 AM

That helps so much! Thanks for going to the trouble of creating that sample!

Georg Schmidt
Replied On September 7, 2004 11:48 PM

Is there allready a target release date of that version? We have this problem too. Thanks, Georg >Hi John, > >Essential Diagram at present does not have built-in support for hosting Windows Forms controls in a diagram. We already have a very high priority feature request on this issue and will definitely add the functionality for ''Control container'' Symbols in a future version of the product. > >However, one option that you could pursue for the time being would be to implement the Control creation/management functionality inside your application and map these controls to corresponding symbols on the diagram. While this approach will not be the exact equivalent of having native control-type symbols, it would provide functionality that closely resembles it. All you would have to do is subscribe to Diagram events that would notify you when the Symbol was created (Diagram.Model.ChildrenChanging/ChildrenChangeComplete), create and map your control to the symbol and use the Symbol''s bounds to add it to the Diagram control instance. You can then handle the Diagram.Model.BoundsChanged and Moved events to size/move the control with it''s parent symbol. It should be fairly simple to implement something along these lines and our support engineers will be happy to guide you with the details. > >Please let us know if any additional clarification is required. > >Regards, >Prakash Surendra >Syncfusion, Inc

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

Hi Georg We are currently working on shipping a final version of Essential Diagram which will include Scripting support. We will then be looking at the feature list for the next version and I will update this posting as soon as this information becomes available. In the meantime, here is a modified version of the sample, where the button postion within the custom Symbol is adjusted on the basis of the bounds of the Symbol. Kindly take a look at this sample and let us know if you have any further quesions. Regards Arun

Georg Schmidt
Replied On January 18, 2005 02:41 AM

Hi. Are there new information about a release date of control support? Thanks, Georg

Administrator [Syncfusion]
Replied On January 19, 2005 07:23 AM

Hi Georg, I am very sorry, but control hosting capability will not be featured for the forthcoming 3.1 version of Essential Diagram. However, I would like to assure you that we have deemed this functionality as critical and will definitely work on providing it for the subsequent release. I hope the sample Arun provided earlier provides some sort of an interim solution. Please bear with us for the time being. Thanks, Prakash Surendra Syncfusion, Inc

MikeS
Replied On January 27, 2005 11:22 AM

I should mention that this is a CRITICAL (go/no go) issue for us (we assumed that it already did!) I''ve tried running your example, but am getting licensing error message: Could not transform licenses ile ''licenses.licx'' into a binary resource. (1) : error LC0003 : Unabled to resolve type ''Syncfusion.Windows.Forms.Diagram.Controls.Diagram, Syncfusion.Diagram, Version=2.0.5.1, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89'' This makes it difficult to determine if the suggested workaround is satisfactory.

Administrator [Syncfusion]
Replied On January 28, 2005 01:55 PM

Hi Mike, The error that you noticed is a result of the sample containing a licensing file that was generated when linking to an older version of Essential Diagram. Assuming that you have the latest Essential Suite evaluation version installed on your system, you can safely delete the licensing file from the sample project by opening it in VS.NET, selecting the ''Show All Files'' option from the VS.NET Solution Explorer window and deleting the ''licenses.licx'' file. The sample should now build without any problems. Another option would be to regenerate the licensing information by opening the sample''s MainForm in the VS.NET designer and making some minor change to the form and resaving it. Please note that if you are running the latest 3.0.1.X version of the Essential Suite eval, then you will also have to update the Syncfusion assembly references for the project. Using the ''Add Reference'' dialog, navigate to the ''..Essential Suite\Assemblies\'' folder and select the Syncfusion.Shared.Base, Syncfusion.Shared.Windows, Syncfusion.Diagram.Base and Syncfusion.Diagram.Windows assemblies. These assemblies should replace the existing references to ''Syncfusion.Shared'' and ''Syncfusion.Diagram''. I will post an updated version of the sample as well. Regards, Prakash Surendra, Syncfusion, Inc

Administrator [Syncfusion]
Replied On January 28, 2005 02:02 PM

Attached is a version of the sample that uses the Essential Suite 3.0 assembly structure. Prakash Syncfusion, Inc ControlSymbol_2839.zip

MikeS
Replied On April 6, 2005 09:28 AM

What''s the status of adding this functionality please?

Administrator [Syncfusion]
Replied On April 6, 2005 11:16 AM

Hi Mike, The next update of Essential Diagram, v 3.2, is due out later today, and this build includes a preliminary version of a ''Syncfusion.Windows.Forms.Diagram.ControlNode'' node type that will let you host Windows Forms controls on a diagram. While the ControlNode class itself is fully functional and can be used in your applications, the interactive ControlNodeTool featured in this build still remains to be fully implemented. Hence for the time being you will be able to create and add ControlNodes only through the programmatic API. The ControlNodeTool functionality will be updated in a forthcoming minor update of the product. Regards, Prakash Surendra Syncfusion Inc.,

MikeS
Replied On April 8, 2005 10:51 AM

What''s the best way to stay abreast of this particular feature, as it represents a boolean decision about our use of the product, specifically the full implementation you mentioned?

Administrator [Syncfusion]
Replied On April 8, 2005 05:36 PM

Mike, The new 3.2 version of Essential Diagram features the full implementation for the new ControlNode class that enables hosting Windows Forms controls on a diagram. The class is fully documented in this release, and can be used in your applications. It is only the user interface tool that facilitates the interactive creation of this node type that still remains to be included in the product. Since user interface tools can be added/removed at anytime from within your application, I will provide you with the ''ControlNodeTool'' class as soon as the implementation is complete, and you can directly use it. I will update this incident with the tool and a sample demonstrating the new ControlNode class within a day or two. Thanks, Prakash Syncfusion Inc.,

Administrator [Syncfusion]
Replied On April 13, 2005 10:02 AM

Prakash, have got the version 3.2 installed. The only reason I upgraded was to get diagram control hosting functionality. I very much want to use this product, but I am on deadlines here, and really could use that sample on controlnode hosting you promised in a day or 2 on the 8th! thanks, Steve

Administrator [Syncfusion]
Replied On April 15, 2005 10:25 AM

Hi Steve, I am sorry about the delay in furnishing the sample. But the good news is that we were able to fully wrap up the control hosting implementation, and have integrated the feature into the release version of Essential Diagram 3.2. This final version of Essential Studio 3.2 is due to ship very shortly(later today or early next week), and will feature a ''ControlsGalore'' sample that demonstrates all aspects of the ControlNode and ControlNodeTool classes. Regards, Prakash Surendra Syncfusion Inc.,

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.

;