Skip to content

Commit

Permalink
fix: UIElementCollection adding the view twice
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-sv committed Nov 6, 2020
1 parent a9091f9 commit 52fa4e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Uno.UI/UI/Xaml/UIElementCollectionExtensions.Xamarin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ public static void Add(this UIElementCollection uiElementCollection, _View view)
{
uiElementCollection.Add(uiElement);
}

var wrapper = VisualTreeHelper.AdaptNative(view);
uiElementCollection.Add(wrapper);
else
{
var wrapper = VisualTreeHelper.AdaptNative(view);
uiElementCollection.Add(wrapper);
}
}
}
}

0 comments on commit 52fa4e5

Please sign in to comment.