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

Add nodes loaded from another xaml file

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

3 Replies

SC Sudhakar C Syncfusion Team December 30, 2013 04:57 AM UTC

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



DM Domenico Mozzone January 8, 2014 05:11 PM UTC

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



SC Sudhakar C Syncfusion Team January 16, 2014 09:07 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon