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

ListView Selected Item Background Color

$
0
0

Summary

Provide a simple API for specifying the background color to use for the selected item in a ListView. Currently, this is only achievable through custom renderers for each platform.

API Changes

Add a new BindableProperty to ListView named "SelectedItemBackgroundColor".

Code

ListView lv = new ListView();
lv.SelectedItemBackgroundColor = Color.Blue;

XAML

<ListView SelectedItemBackgroundColor="Blue"/>

Intended Use Case

Changing the selected item background color seems like a common use case of a ListView. Each app has it's own visual style so changing this color to match your app's style seems like functionality that Xamarin.Forms should support natively.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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