Hi.
I am trying to create a window with a diagram, in which the user can add shapes (rectangle, triangle, ellipse) , change the size and save/load.
The issue is that the size of the shape is not used when adding the controls to the grid upon loading them.
I've created a sample user-control that shows this behavior. you can see that I've added via code few shapes. the shape of type Rectangle uses the given width/height, while the ellipse shape uses a default size.
What am I missing here?
I have created a private support case for you. It has an ID of C-00220633, and you can access it after signing into your account on the Infragistics website, here: https://account.infragistics.com/support-cases.
Since the XamDiagram doesn't natively support load/saving the layout you might want to look into using our persistence framework, this was previously discussed herehttps://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/94278/saving-diagram
However, I logged a development issue,273598, that we will discuss further in the private case.
5315.WpfApp1.zip
Hi, attached a project showing the issue.
click on Load, you get a set of default new controls.
Increase the size of a rectangle and an ellipse.
save
click load again - you will see that the rectangle size is shown currently while the ellipse side is set back to the default size.
the textbox showing the log can show you that the width/height are loaded correctly but it just doesn't set to these values.
Hello Eli,
Thank you for following up. Please attach a complete sample, as I don't see MyShapeControlAttributes nor the test.xml
Hi, thanks.
Yes, I am aware that the toolbox exists, I'm using it and the diagram together to create some kind of designer and the user can save/load the diagram using xml (togther with many other properties which are not relevant to the bug).
I have created a very small example to show the issue itself, the toolbox is less relevant to the bug.
Hello and thank you for contacting Infragistics. Before we dive into your attachment I wanted to bring to your attention that the XamDiagram has it's own built-in Toolbox (aka XamDiagramToolbox) that lets your users drag items to the diagram surface without having to jump through hoops to do this manually.
eg.
https://ko.infragistics.com/help/wpf/xamdiagram-configuring-the-toolbox
Let me know if this helps at all or have any questions.