[Mono-winforms-list] Control.AutoSize patch is on the way!!

Stefan Noack noackstefan at googlemail.com
Sat Mar 24 22:21:39 EDT 2007


Hi there!

I've now been working for hours and i seem to get this damn AutoSize
working. I'm still improving the tests.
Here's what i found out how it should work (Based on MSDN and some Tests)

-Control itself just sets Autosize to True or False. The real work is done
by the LayoutEngine
-The LayoutEngine asks the Control via "GetPreferredSize" which size it
likes to have.
-controls override this to implement their specific autosize behaviour just
by telling the LE their size when asked for it.
-the behaviour of the LayoutEngine differs depending on the AutoSizeMode of
the Control which can be set by derived classes via SetAutoSizeMode

I don't know how Microsoft stores the value of AutoSizeMode. It must be
somehow visible for the Layout engine. I think an internal property will
also do.


when the tests pass on microsofts runtime i will complete the missing stuff
in mono and submit a patch as soon as possible

greetz, noah.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070325/08775eee/attachment.html 


More information about the Mono-winforms-list mailing list