Ignore context change to null on UAP listview (#4412) fixes #4373
authorkingces95 <kingces95@users.noreply.github.com>
Tue, 4 Dec 2018 18:28:35 +0000 (08:28 -1000)
committerRui Marinho <me@ruimarinho.net>
Tue, 4 Dec 2018 18:28:35 +0000 (18:28 +0000)
Xamarin.Forms.Platform.UAP/CellControl.cs

index 582fbdf..ccdc505 100644 (file)
@@ -161,6 +161,9 @@ namespace Xamarin.Forms.Platform.UWP
 
                void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
                {
+                       if (args.NewValue == null)
+                               return;
+
                        // We don't want to set the Cell until the ListView is realized, just in case the 
                        // Cell has an ItemTemplate. Instead, we'll store the new data item, and it will be
                        // set on MeasureOverrideDelegate. However, if the parent is a TableView, we'll already