Browse Source

Fixed NativeControlHost to prevent calling ShowInBounds when control bounds are empty.

pull/5413/head
João Neves 5 years ago
parent
commit
817ef37b80
  1. 6
      src/Avalonia.Controls/NativeControlHost.cs

6
src/Avalonia.Controls/NativeControlHost.cs

@ -157,10 +157,14 @@ namespace Avalonia.Controls
var needsShow = IsEffectivelyVisible && bounds.HasValue;
if (needsShow)
{
if (bounds.Value.IsEmpty)
return false;
_attachment?.ShowInBounds(bounds.Value);
}
else
_attachment?.HideWithSize(Bounds.Size);
return false;
return true;
}
private void CheckDestruction()

Loading…
Cancel
Save