使用CornerRadius的框架不会变圆

时间:2018-04-28 18:53:41

标签: xaml xamarin xamarin.forms

我试图围绕标签构建一个圆圈,其中包含一些文字。

<StackLayout Grid.Row="0" BackgroundColor="White" Padding="0,40,0,0">
    <Label Text="Your total score is" FontSize="30" HorizontalTextAlignment="Center" Style="{DynamicResource FontBold-Bold}"/>
    <Frame BackgroundColor="White" CornerRadius="30" OutlineColor="#03A9F4" HeightRequest="20" WidthRequest="20" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Margin="0" Padding="0">
        <Label Text="57%" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/>
    </Frame>
</StackLayout>

不幸的是,框架并没有成为一个圆圈。无论我增加多少CornerRadius属性,角落都保持不变。

注意,Frame在Android上显示为一个圆圈。

0 个答案:

没有答案