首页 > 解决方案 > 按钮在较低分辨率下转义堆栈布局

问题描述

这是问题的屏幕截图(左 = Xamarin.Forms 预览器;右 = ADV 768x1080)

在此处输入图像描述

代码:

<Frame BackgroundColor="#292929" VerticalOptions="CenterAndExpand" Margin="20,0,20,0" CornerRadius="4" Padding="0">
        <StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Padding="5">
                 <StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Tomato">
                    <Label FontSize="Small" Text="ABBONAMENTO 30 giorni" TextColor="White"/>
                    <Label FontSize="Small" Text="€10,99" HorizontalOptions="EndAndExpand" TextColor="#ff9900"/>
                 </StackLayout>
                    <Button HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Text="ISCRIVITI" TextColor="#eeeeee" BackgroundColor="#FF9900" CornerRadius="4"/>
        </StackLayout>
 </Frame>

框架放在一个StackLayout中,其父级是一个网格。

该问题仅在低分辨率设备上仍然存在。你能告诉我为什么会发生这种情况,以及如何解决它吗?

我需要这种布局具有高度感知和响应能力。

标签: xamlxamarinlayoutxamarin.forms

解决方案


推荐阅读