项目作者: SyncfusionExamples

项目描述 :
Sample showcases how to navigate xamarin.forms listview across each listviewitem in horizontal orientation
高级语言: C#
项目地址: git://github.com/SyncfusionExamples/How-to-navigate-xamarin.forms-listview-across-listviewitem.git


Navigation across views (like TabView)

The SfListView allows you to layout the items like TabView in the horizontal direction by setting the Orientation property as Horizontal using the ItemTapped event. It brings any desired view above the horizontal list as follows.

  1. <ContentPage xmlns:syncfusion="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms">
  2. <ContentPage.Content>
  3. <Grid x:Name="GridView">
  4. <Label Text="Tap image to expand"></Label>
  5. <Grid>
  6. <Image Source="{Binding ContactImage}" ></Image>
  7. <Label Text="{Binding ContactName}" ></Label>
  8. <Label Text="{Binding ContactNumber}" ></Label>
  9. </Grid>
  10. <syncfusion:SfListView x:Name="listView" Orientation="Horizontal" ItemTapped="list_ItemTapped" ItemSize="70" ItemsSource="{Binding ContactsInfo}">
  11. <syncfusion:SfListView.ItemTemplate>
  12. <DataTemplate x:Name="ItemTemplate" x:Key="ItemTemplate" >
  13. <ViewCell>
  14. <ViewCell.View>
  15. <Image Source="{Binding ContactImage}" ></Image>
  16. </ViewCell.View>
  17. </ViewCell>
  18. </DataTemplate>
  19. </syncfusion:SfListView.ItemTemplate>
  20. </syncfusion:SfListView>
  21. </Grid>
  22. </ContentPage.Content>
  23. </ContentPage>

To know more about ListView appearance, please refer our documentation here.