Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在Xamarin.Forms列表视图中创建手风琴_C#_Listview_Accordion_Xamarin.forms - Fatal编程技术网

C# 如何在Xamarin.Forms列表视图中创建手风琴

C# 如何在Xamarin.Forms列表视图中创建手风琴,c#,listview,accordion,xamarin.forms,C#,Listview,Accordion,Xamarin.forms,如何使用数据绑定在列表视图中创建手风琴? 我正在使用Xamarin.Forms创建此应用程序 这就是我到目前为止所做的: <ListView x:Name="List" HasUnevenRows="True" > <ListView.ItemTemplate> <DataTemplate> <ViewCell> <ViewCell.View> <Grid Padding

如何使用数据绑定在
列表视图中创建手风琴?
我正在使用
Xamarin.Forms
创建此应用程序

这就是我到目前为止所做的:

<ListView x:Name="List" HasUnevenRows="True" >
  <ListView.ItemTemplate>
    <DataTemplate>
      <ViewCell>
        <ViewCell.View>
          <Grid Padding="10,10,10,10">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"></RowDefinition>
              <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Label Text="ABC:-" FontSize="20" TextColor="Black" Grid.Column="0" Grid.Row ="0"/>
            <Label Text="{Binding ABC}" FontSize="20" TextColor="Black" Grid.Column="1" Grid.Row ="0" HorizontalOptions="EndAndExpand" VerticalOptions="FillAndExpand"/>
            <Label Text="XYZ:-" FontSize="20" TextColor="Black" Grid.Column="0" Grid.Row ="1"/>
            <Label Text="{Binding XYZ}" FontSize="20" TextColor="Black" Grid.Column="1" Grid.Row ="1" HorizontalOptions="EndAndExpand" VerticalOptions="FillAndExpand"/>
           </Grid>
        </ViewCell.View>
      </ViewCell>
    </DataTemplate>
  </ListView.ItemTemplate>
</ListView>

您可能想查看下面列出了一些选项的线程。我们的手风琴视图不在
ListView
中,但我们基本上只是使用
WidthRequest
和一些动画来使各种
WebView
展开和折叠


改进了格式。您已经解决了这个问题吗?如果没有,您希望扩展和折叠哪些元素?是否希望每个
ViewCell
能够展开和折叠,或者希望
ViewCell
中的每个
网格
或者
网格
中的每个
标签
?@hvaughan3查看单元格中的每个网格