Make CollectionView SelectedItem and SelectedItems binding function correctly (#6085)
authorE.Z. Hart <hartez@users.noreply.github.com>
Tue, 28 May 2019 17:54:09 +0000 (11:54 -0600)
committerSamantha Houts <samhouts@users.noreply.github.com>
Tue, 28 May 2019 17:54:09 +0000 (10:54 -0700)
commit34165550f5757d2fe3a17b9a3108109d0fbdfcce
tree49190e9796f671db64648c092a2952bdee8c7cde
parent6169b972a218c3a2378e6f64127cc7be378ad509
Make CollectionView SelectedItem and SelectedItems binding function correctly (#6085)

* Add automated test for CollectionView single selection bound item

* Make SelectedItem Two-Way

* Multiple selection test page

* Bindable SelectedItems implementation

* Add automated test

* Simplify null checks

* Add Preserve attribute so linker doesn't break test

* Make multi-item select test smaller so it passes UITests on smaller screens

* Clearer list-to-string method

* Clear native selection on iOS when SelectedItem set to null

fixes #6158
fixes #5832
15 files changed:
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CollectionViewBoundMultiSelection.cs [new file with mode: 0644]
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CollectionViewBoundSingleSelection.cs [new file with mode: 0644]
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/BoundSelectionModel.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/MultipleBoundSelection.xaml [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/MultipleBoundSelection.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/SelectionGallery.cs
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/SelectionHelpers.cs [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/SelectionModeGallery.xaml.cs
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/SingleBoundSelection.xaml [new file with mode: 0644]
Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/SelectionGalleries/SingleBoundSelection.xaml.cs [new file with mode: 0644]
Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj
Xamarin.Forms.Core/Items/SelectableItemsView.cs
Xamarin.Forms.Core/Items/SelectionList.cs
Xamarin.Forms.Platform.iOS/CollectionView/SelectableItemsViewController.cs