mono/xwt — Issue #10: WPF Backend - layout bug
Author: luiscubal
Created: 2012-01-18 18:39:45+00:00
State: open

This might not be the appropriate tracker to report this bug, since the code I am referring to is in a fork that was not yet pulled in, but I chose to report this bug here because the WPF fork doesn't seem to have its own issue tracker.

While developing the button backend, I noticed that merely changing the button label completely destroys the layout.
If the window is resized or even moved, the layout is good once again.

Even though this bug is exposed by my button backend, I believe this might be a problem with the basic layout system itself.
Adding SWC.Canvas.SetLeft/SetTop and setting e.Width/e.Height to BoxBackend seems to solve the problem.

I attached a couple images showing the bug. In this example, I created a HBox with three buttons. The first one has a label "Click me!" and, when clicked, changes the label to "Thank you".

![initial](https://lh3.googleusercontent.com/-OnoOuWtJw34/TxcQuVcWELI/AAAAAAAAACc/BOzCEv12tZ4/s400/layout-bug1.png)
![bug](https://lh6.googleusercontent.com/-Aa5Kx0GU_Po/TxcQuSRB3JI/AAAAAAAAACg/E7bzHQaI4P8/s400/layout-bug2.png)