Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Set selected List view background color

$
0
0

Hi ,

I used list view in Xamarin forms application, In this i need to set the background color or transparent color for selected cell is this possible ?

`var cell = new DataTemplate (typeof(ImageCell));

        cell.SetBinding (TextCell.TextProperty, "Name");
        cell.SetBinding (TextCell.DetailProperty, "Location");
        cell.SetBinding (ImageCell.ImageSourceProperty, "Image");

        cell.SetValue (TextCell.TextColorProperty, Color.White);
        cell.SetValue (TextCell.DetailColorProperty, Color.White);


        ListView listView = new ListView {

            ItemsSource = presidents,
            ItemTemplate = cell // Set the ImageCell to the item template for the listview

        };

        listView.BackgroundColor = Color.Transparent;`

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>