Skip to content

Commit

Permalink
fix: Do not materialize ElementStub if no parent
Browse files Browse the repository at this point in the history
  • Loading branch information
David authored and dr1rrb committed Mar 10, 2021
1 parent 7471a78 commit 5fca6db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Uno.UI/UI/Xaml/ElementStub.cs
Expand Up @@ -87,8 +87,9 @@ protected override void OnVisibilityChanged(Visibility oldValue, Visibility newV
base.OnVisibilityChanged(oldValue, newValue);

if (ContentBuilder != null
&& oldValue == Visibility.Collapsed
&& oldValue == Visibility.Collapsed
&& newValue == Visibility.Visible
&& Parent != null
)
{
Materialize(isVisibilityChanged: true);
Expand Down

0 comments on commit 5fca6db

Please sign in to comment.