如何在Xamarin表单中制作卡片样式ListView

Pho*_*hop 5 c# xaml listview xamarin

我试图做一个基于卡的ListView在基于断ahaliav狐狸的XAML例子Xamarin形式在这里不过我没有得到什么附近他得到的任何地方我只有一个文本标签,我需要在卡中显示

继承我的xaml代码:

    <?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WebSearch.CountySelect" BackgroundColor="Gray">
  <ListView x:Name="listView">
    <ListView.ItemTemplate>
      <DataTemplate>
        <ViewCell>

          <Frame Padding="0,0,0,3">
            <Frame.Content>
              <Frame Padding="15,15,15,15"   OutlineColor="Gray" BackgroundColor="White">
                <Frame.Content>
                  <StackLayout Padding="20,0,0,0"  Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
                    <Label Text="{Binding Name}"
                           FontFamily="OpenSans-Light"
                           FontSize="9"
                           TextColor="#69add1"/>
                  </StackLayout>

                </Frame.Content>

              </Frame>
            </Frame.Content>

          </Frame>

        </ViewCell>
      </DataTemplate>
    </ListView.ItemTemplate>
    </ListView>
</ContentPage>
Run Code Online (Sandbox Code Playgroud)

编辑:我通过使用框架得到ListView项目类似于卡但标签上的文字切断了一半,除非我使文本大小9或更低,以任何方式解决这个错误?

我更新了我的代码以反映我遇到的新问题

任何帮助都会很棒!

Dea*_*alk 7

尝试将该ListView.HasUnevenRows属性设置为true