Skip to content

This repository contains the sample about how to customize selected item in xamarin forms listview

Notifications You must be signed in to change notification settings

SyncfusionExamples/Customize-selected-item-in-xamarin.forms-listview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Selected item customization in ListView

The SfListView supports customizing the selection background color for the selected items by using the SfListView.SelectedItemTemplate if the background color is set to view loaded in the SfListView.ItemTemplate.

<ContentPage  xmlns:syncfusion="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms">
  <syncfusion:SfListView x:Name="listView">
   <syncfusion:SfListView.SelectedItemTemplate>
    <DataTemplate>
     <Grid x:Name="grid" BackgroundColor="RoyalBlue">
      <Grid.RowDefinitions>
         <RowDefinition Height="*" />
         <RowDefinition Height="*" />
         <RowDefinition Height="1" />
       </Grid.RowDefinitions>
      <Label Text="{Binding SongTitle}" />
      <Label Text="{Binding SongAuther}" Grid.Row="1"/>
      <Frame Grid.Row="2" HasShadow="True" HeightRequest="1"/>
     </Grid>
    </DataTemplate>
   </syncfusion:SfListView.SelectedItemTemplate>
  </syncfusion:SfListView>
</ContentPage>

To know more about selection in ListView, please refer our documentationhere.

About

This repository contains the sample about how to customize selected item in xamarin forms listview

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages