【发布时间】:2019-11-14 10:08:53
【问题描述】:
我在 XAML 中使用 Frames 来实现卡片视图。但这种设计与谷歌应用卡片视图或任何其他应用卡片视图都不相近。另外,我没有看到所有 3 个侧面都有漂亮的阴影,而是有一条假的阴影线
代码如下:
<Frame Margin="0,20,0,0"
IsClippedToBounds="True"
HasShadow="True">
<Frame.OutlineColor>
<OnPlatform x:TypeArguments="Color"
Android="Gray"
iOS="Gray"></OnPlatform>
</Frame.OutlineColor>
<StackLayout Orientation="Horizontal" Spacing="0">
<Image Source="mf_tickets1.png" WidthRequest="30" HeightRequest="30" Aspect="AspectFill" VerticalOptions="Center"/>
<Label x:Name="showsummary" Text="Summary " TextColor="Black" FontSize="Medium" FontAttributes="Bold" VerticalOptions="Start" >
</Label>
<Image x:Name="SummageHideShowImage1" Source="{Binding SummageHideShowImage}" WidthRequest="30" HeightRequest="30"
Aspect="AspectFill" HorizontalOptions="EndAndExpand" VerticalOptions="Center" ></Image>
</StackLayout>
</Frame>
有没有其他方法可以实现良好的卡片视图布局以使我的应用成为高级应用?
【问题讨论】:
标签: xamarin.forms xamarin.android frame cardview