|
|
|
@ -91,7 +91,7 @@ namespace Avalonia.Controls |
|
|
|
arrangedsize = TransformRoot.Bounds.Size; |
|
|
|
|
|
|
|
// This is the first opportunity under Silverlight to find out the Child's true DesiredSize
|
|
|
|
if (IsSizeSmaller(finalSizeTransformed, arrangedsize) && (Size.Empty == _childActualSize)) |
|
|
|
if (IsSizeSmaller(finalSizeTransformed, arrangedsize) && _childActualSize.IsDefault) |
|
|
|
{ |
|
|
|
//// Unfortunately, all the work so far is invalid because the wrong DesiredSize was used
|
|
|
|
//// Make a note of the actual DesiredSize
|
|
|
|
@ -102,7 +102,7 @@ namespace Avalonia.Controls |
|
|
|
else |
|
|
|
{ |
|
|
|
// Clear the "need to measure/arrange again" flag
|
|
|
|
_childActualSize = Size.Empty; |
|
|
|
_childActualSize = default; |
|
|
|
} |
|
|
|
|
|
|
|
// Return result to perform the transformation
|
|
|
|
@ -122,7 +122,7 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
|
|
|
|
Size measureSize; |
|
|
|
if (_childActualSize == Size.Empty) |
|
|
|
if (_childActualSize.IsDefault) |
|
|
|
{ |
|
|
|
// Determine the largest size after the transformation
|
|
|
|
measureSize = ComputeLargestTransformedSize(availableSize); |
|
|
|
@ -206,7 +206,7 @@ namespace Avalonia.Controls |
|
|
|
/// <summary>
|
|
|
|
/// Actual DesiredSize of Child element (the value it returned from its MeasureOverride method).
|
|
|
|
/// </summary>
|
|
|
|
private Size _childActualSize = Size.Empty; |
|
|
|
private Size _childActualSize = default; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// RenderTransform/MatrixTransform applied to TransformRoot.
|
|
|
|
@ -281,7 +281,7 @@ namespace Avalonia.Controls |
|
|
|
private Size ComputeLargestTransformedSize(Size arrangeBounds) |
|
|
|
{ |
|
|
|
// Computed largest transformed size
|
|
|
|
Size computedSize = Size.Empty; |
|
|
|
Size computedSize = default; |
|
|
|
|
|
|
|
// Detect infinite bounds and constrain the scenario
|
|
|
|
bool infiniteWidth = double.IsInfinity(arrangeBounds.Width); |
|
|
|
|