I custom a layout name ConstraintLayout according to AbsoluteLayout in MAUI.
It like AbsoluteLayout have a LayoutManager class,i overrride Measure and ArrangeChildren method in this class.
It also have a ConstrainLayout class.
public class ConstraintLayout : Layout, IConstraintLayout
Source Code at ConstraintLayout.Maui
I print control information, found control in layout have correct position and size, such as position of Entry at center of window. but nothing show at window.
I need set something at builder or Handler? i don't find doc about it.
I see that
AbsoluteLayout
works via aLayoutManager
.Find
AbsoluteLayout.cs
. See its:Do similar, but find
AbsoluteLayoutManager.cs
, and make a similarConstraintLayoutManager
that uses your constraint logic. Then your method inConstraintLayout
will be:NOTE: Don't do my (now deleted) comment's
ConstraintLayout : AbsoluteLayout ...
. Go back to your originalConstraintLayout : Layout, IConstraintLayout
.