Browse Source

Merge pull request #5413 from joaompneves/nativehostcontrol-emptybounds-fix

Fixed NativeControlHost to prevent calling ShowInBounds when bounds empty
pull/4731/head
Dan Walmsley 5 years ago
committed by GitHub
parent
commit
94300c7d8b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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