I'm trying to develop a wpf chat application.I've been looking everywhere for a way to select an item in a ListView and change the color of the row to let the user know which row is selected programatically.
What my requirement exactly is:
On login to the application the user is able to see list of channels and contacts and the logged-in user gets a notification when a user sends him a message.If the user clicked on that notification then the message sender contact should be highlighted to let the user know which chat is opened.
I've tried to set the selected item of listview as the sender based on id but still no use.
var index = _myViewModel.Users.IndexOf(selectedUser);
MyListView.SelectedItem = _myViewModel.Users[index];
I've googled about this and found some links which provide solutions for same case in xamarin/xamarin.android/winforms. but nothing solves my problem as the properties they've used are not available in xamarin.forms listview.
Here are the links:
Xamarin Android ListView select item and change row color
How to select an item in a ListView programmatically?.
Is it possible to do like this.If yes,Is there any workaround to achieve this.Can anyone please help me with this.
Thanks.