Skip to content

Commit

Permalink
Merge pull request unoplatform#14610 from unoplatform/Youssef1313/alw…
Browse files Browse the repository at this point in the history
…ays-true-condition

chore: Remove always-true condition when adding UIElement to collection
  • Loading branch information
jeromelaban authored Nov 29, 2023
2 parents 84842bd + 2b3afcb commit 72dfb91
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Uno.UI/UI/Xaml/UIElementCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ public UIElement this[int index]

public void Add(UIElement item)
{
if (item is IDependencyObjectStoreProvider provider)
{
item.SetParent(_owner);
}
item.SetParent(_owner);

AddCore(item);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));
Expand Down

0 comments on commit 72dfb91

Please sign in to comment.