Bug 28520 - [UWP] ListView ItemSelected event & SelectedItem property only fires once
Summary: [UWP] ListView ItemSelected event & SelectedItem property only fires once
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.5
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-03-28 23:43 UTC by Matthew Leibowitz
Modified: 2017-12-20 00:51 UTC (History)
8 users (show)

Tags: windows, functional, listview, ac, uwp
Is this bug a regression?: ---
Last known good build:

{SelectedItem}=null not working (341.71 KB, application/x-zip-compressed)
2015-03-29 00:47 UTC, Matthew Leibowitz
Sample Project (372.16 KB, application/octet-stream)
2015-07-21 07:25 UTC, Parmendra Kumar

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Matthew Leibowitz 2015-03-28 23:43:57 UTC
On Windows Phone 8.1 (Runtime) the ItemSelected event only fires once. If a navigation occurs, going back still does not trigger the event.

This works fine for WP8 Silverlight.
Comment 1 Matthew Leibowitz 2015-03-29 00:46:13 UTC
An update :

This is more of a problem of the ListView not being able to update the view when the SelectedItem binding property is set to null.

I have attached a project:
Clicking the Clear Selection button should unselect the list item.

I did not test iOS, but it does not work on WPSL/WPRT/Android
Comment 2 Matthew Leibowitz 2015-03-29 00:47:38 UTC
Created attachment 10542 [details]
{SelectedItem}=null not working
Comment 3 Stephane Delcroix 2015-06-22 04:55:10 UTC
this will be fixed in 1.4.4
Comment 4 Parmendra Kumar 2015-07-21 07:23:13 UTC
I have checked this issue with Xamarin.Forms 1.4.4-pre3 and observed that 

1. On Android phone After clicking on Clear button the selection doesn't unselected.

2. On WinPhone I am getting Exception: 

'System.IO.FileNotFoundException' occurred in Microsoft.Band.Portable.Sample.DLL
'System.Exception' occurred in Microsoft.Band.Portable.Sample.Phone.exe

Screencast: http://www.screencast.com/t/iqkwf5sk3

WinPhone AppOutput Log: https://gist.github.com/Parmendrak/6d72a408f6161497a46b

Could you please let me know Is this a separate bug or I have missed anything?

Comment 5 Parmendra Kumar 2015-07-21 07:25:33 UTC
Created attachment 12130 [details]
Sample Project

Here is sample project.
Comment 6 Paul DiPietro [MSFT] 2017-06-19 15:34:17 UTC
Using that reproduction (moving the code into a new project to be used against UWP in particular) it seems like this is still a thing where setting it to null isn't firing off the ListView's PropertyChanged event. Checked against the latest 2.3.6-nightly.
Comment 7 Chris King 2017-06-23 18:43:20 UTC
David, Windows 8.1 bug over to you for routing.
Comment 8 David Ortinau [MSFT] 2017-06-23 18:50:52 UTC
According to Paul it's still occuring on UWP, so we'll put it in the work queue.
Comment 9 David Ortinau [MSFT] 2017-12-20 00:51:32 UTC
Migrated to https://github.com/xamarin/Xamarin.Forms/issues/1432

Please follow that issue for future updates.