Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

How to create a horizontal listview in Xamarin.Forms

This example demonstrates how to create a horizontal listview using Xamarin.Forms SfListView.

Sample

        <Grid>
            <syncfusion:SfListView x:Name="listView"
                                   Orientation="Horizontal"
                                   ItemsSource="{Binding Gallerynfo}">

                <syncfusion:SfListView.ItemTemplate>
                    <DataTemplate>
                        <Frame BackgroundColor="#EEEEEE" Padding="2">
                            <Frame.HasShadow>
                                <OnPlatform x:TypeArguments="x:Boolean">
                                    <On Platform="Android" Value="True"/>
                                    <On Platform="UWP" Value="True"/>
                                    <On Platform="iOS,macOS" Value="False"/>
                                </OnPlatform>
                            </Frame.HasShadow>
                            <Grid RowSpacing="0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="48" />
                                </Grid.RowDefinitions>
                                <Image Source="{Binding Image}" Aspect="Fill"/>
                                <Label Grid.Row="1" Text="{Binding ImageTitle}"
                                       LineBreakMode="WordWrap"
                                       HorizontalTextAlignment="Start"
                                       VerticalTextAlignment="Center"
                                       TextColor="Black" Opacity="0.87"
                                       Margin="16,0,0,0" FontSize="16">
                                </Label>
                            </Grid>
                        </Frame>
                    </DataTemplate>
                </syncfusion:SfListView.ItemTemplate>
            </syncfusion:SfListView>
        </Grid>

See How to create a horizontal listview in Xamarin.Forms for more details.

Requirements to run the demo

Troubleshooting

Path too long exception

If you are facing path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

About

This example demonstrates how to create a horizontal listview using Xamarin.Forms SfListView.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages