Skip to content

SyncfusionExamples/How-to-set-a-margin-and-padding-to-the-Xamarin.Forms-listview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

How to set a margin and padding to the Xamarin.Forms listview?

This example demonstrates how to set margin and padding to Xamarin.Forms listview.

Sample

<Grid BackgroundColor="DarkBlue" >
    <syncfusion:SfListView x:Name="listView" SelectionMode="None" BackgroundColor="LightGray" 
                            ItemSize="70" Margin="15" Padding="25"
                            ItemsSource="{Binding contactsinfo}">
        <syncfusion:SfListView.GroupHeaderTemplate>
            <DataTemplate>
                <ViewCell>
                    <Label Text="{Binding Key}" FontAttributes="Bold" FontSize="24"/>
                </ViewCell>
            </DataTemplate>
        </syncfusion:SfListView.GroupHeaderTemplate>
        
        <syncfusion:SfListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <ViewCell.View>
                        <Grid x:Name="grid" >
                            <code>
                            . . .
                            . . .
                            <code>
                        </Grid>
                    </ViewCell.View>
                </ViewCell>
            </DataTemplate>
        </syncfusion:SfListView.ItemTemplate>
    </syncfusion:SfListView>
</Grid>

See How to set a margin and padding to the Xamarin.Forms listview? 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 set margin and padding to Xamarin.Forms listview.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages