summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-11-09 14:15:12 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-11-16 20:03:13 (GMT)
commite5af21fdc32972d4355af86349d446a2bb6a5b02 (patch)
tree50cde95dcc90832977f5c4caf23eee6cca087601 /Xamarin.Forms.Platform.iOS
parent693cc75068fed11c2760a1e8ef2b05310359bbea (diff)
downloadxamarin-forms-e5af21fdc32972d4355af86349d446a2bb6a5b02.zip
xamarin-forms-e5af21fdc32972d4355af86349d446a2bb6a5b02.tar.gz
xamarin-forms-e5af21fdc32972d4355af86349d446a2bb6a5b02.tar.bz2
[C] Use a Binding for ItemsSource object selection
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
index d0cc4ec..5a7fa22 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Specialized;
using System.ComponentModel;
using UIKit;
using RectangleF = CoreGraphics.CGRect;
@@ -15,7 +16,7 @@ namespace Xamarin.Forms.Platform.iOS
protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
{
if (e.OldElement != null)
- ((ObservableList<string>)e.OldElement.Items).CollectionChanged -= RowsCollectionChanged;
+ ((INotifyCollectionChanged)e.OldElement.Items).CollectionChanged -= RowsCollectionChanged;
if (e.NewElement != null)
{
@@ -55,7 +56,7 @@ namespace Xamarin.Forms.Platform.iOS
UpdatePicker();
UpdateTextColor();
- ((ObservableList<string>)e.NewElement.Items).CollectionChanged += RowsCollectionChanged;
+ ((INotifyCollectionChanged)e.NewElement.Items).CollectionChanged += RowsCollectionChanged;
}
base.OnElementChanged(e);