Can you guys please explain why the Frame
doesn't respect the HeightRequest or WidthRequest?
Using those properties in other controls it works as expected.
For example, in this XAML I'm using a Frame
and a BoxView
:
<StackLayout Orientation="Horizontal"
HorizontalOptions="CenterAndExpand"
Padding="10">
<Frame VerticalOptions="Center"
HeightRequest="5"
WidthRequest="5"
BackgroundColor="Red"/>
<BoxView VerticalOptions="Center"
HeightRequest="5"
WidthRequest="5"
Color="Blue"/>
</StackLayout>
And the result is:
There is a big difference between the Frame's size and box's size, but it shouldn't have.
Frame has a default padding of 20. Set Padding="0"
.
See the remarks here: https://developer.xamarin.com/api/type/Xamarin.Forms.Frame/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With