Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1105
XamDiagram Shape Width and Height binding upon load
posted

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?

Parents Reply
  • 1105
    Offline posted in reply to Michael DiFilippo

    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.

Children