Can someone explain the difference between LayoutOptions.Fill and LayoutOptions.FillAndExpand? In the tests I've done, they seem to do the same thing. Am I missing something?
It's complicated... if you use one of the Expand
options on a StackLayout
Expand
optionsthen those children will get the extra space distributed among them (with StartAndExpand
and EndAndExpand
controlling where in that additional space the element will appear).
But if you just put FillAndExpand
on a single element you're right, the behavior won't look any different.
Answers
It's complicated... if you use one of the
Expand
options on aStackLayout
Expand
optionsthen those children will get the extra space distributed among them (with
StartAndExpand
andEndAndExpand
controlling where in that additional space the element will appear).But if you just put
FillAndExpand
on a single element you're right, the behavior won't look any different.That clears things up. Thanks, Craig!
Any documentation on this that clarifies best practice for the most used situations?
For anyone else looking for more explanation on this, here is a link to more detail http://stackoverflow.com/questions/25338533/what-is-the-difference-between-xamarin-forms-layoutoptions-especially-fill-and
fill and expand is works for me only in Xamarin forms iOS only its doesn't works for android , why?
I need to expand my editor to be fillandexpand .
@rio_riya - FYI,
FillAndExpand
works well on Android now. (And to anyone who still has problems with this, make sure parent, indeed all ancestors, are eitherFill
orFillAndExpand
.)