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.

Add nodes loaded from another xaml file

Thread ID:

Created:

Updated:

Platform:

Replies:

114996 Dec 18,2013 03:32 AM Jan 16,2014 04:07 AM WPF 3
loading
Tags: Diagram
Domenico Mozzone
Asked On December 18, 2013 03:32 AM

Good Morning,
I'm using version 11.3.0.30 of WPF diagram.
My need is to add to a diagram control in code behind nodes and connectors "read" from a xaml file representing a small subset of the diagram (a kind of template or block defined in a stand alone xaml diagram file).
I tried the obvious way: create a dymmy diagram control, with its own model and view, load a xaml file with standard Load() command and andd nodes and connector to the main diagram control.
Although I see nodes and connectors in the dummy diagram control, the add operation to the model has no effects
I attached a sln with an example. Code to add nodes read from a xaml is on Inject button.
Subfolder TestFiles contains a file to use.

Can you help me?
Thank you

Best regards

Domenico


TestDiagram025_20131218_092928Z_e018c35d.zip

Sudhakar C [Syncfusion]
Replied On December 29, 2013 11:57 PM

Hi Dominic,

By default, we can’t add the same instance of Node to different diagram control. Currently, we don’t have an option to achieve this requirement. This is not an issue. This is default framework behaviour. Because, we can’t add the same instance of Content Control as child / content of two or more panel / UIElement.

So, we are suggesting you to please remove the Node from the dummy diagram control before adding the Node to main diagram control.

Please let us know if you need further assistance on this.

Regards,

Sudhakar C


Domenico Mozzone
Replied On January 8, 2014 12:11 PM

Hi Sudhakar,
you have maybe misunderstand my help request, it was not my intention to report an issue.

Thanks anyway for the time that you spent for me
Kind regards


Sudhakar C [Syncfusion]
Replied On January 16, 2014 04:07 AM

Hi Domenico,

Sorry for inconvenience.

As the reported query was the default framework behaviour, we were unable to suggest you with a better solution.

Please let us know if you have any other concern.

Regards,

Sudhakar C


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.

;