Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Color item selected of a ListView in PCL

$
0
0

Hello,

I'm searching about color the item selected on a listview xamarin forms. I didn't find an answer by my self and in the forum.

Actualy, I Have :

<ListView x:Name="ListViewClients" 
                ItemTapped="ListViewClients_ItemTapped">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <TextCell Text="{Binding ClientName}"/>
                        </DataTemplate>
                    </ListView.ItemTemplate>
</ListView>

And the function ListViewClients_ItemTapped :

void ListViewClients_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
{
    if (sender != null && e != null)
    {
        Client client = e.Item as Client;
        if (client != null)
        {
            Navigation.PushAsync(new ClientTabbedPage(client));
            ListViewClients.SelectedItem = null;
        }
    }
 }

Sincerely


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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