Browse Source
Merge pull request #5783 from AvaloniaUI/port-relative-panel-fixes
Port relative panel fixes
pull/5801/head
Dan Walmsley
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
src/Avalonia.Controls/RelativePanel.cs
|
|
|
@ -55,7 +55,10 @@ namespace Avalonia.Controls |
|
|
|
_childGraph.Measure(availableSize); |
|
|
|
|
|
|
|
_childGraph.Reset(false); |
|
|
|
var boundingSize = _childGraph.GetBoundingSize(Width.IsNaN(), Height.IsNaN()); |
|
|
|
var calcWidth = Width.IsNaN() && HorizontalAlignment != HorizontalAlignment.Stretch; |
|
|
|
var calcHeight = Height.IsNaN() && VerticalAlignment != VerticalAlignment.Stretch; |
|
|
|
|
|
|
|
var boundingSize = _childGraph.GetBoundingSize(calcWidth, calcHeight); |
|
|
|
_childGraph.Reset(); |
|
|
|
_childGraph.Measure(boundingSize); |
|
|
|
return boundingSize; |
|
|
|
|