Xamarin.forms: DesiredSize at 3.2 Includes Margin which causes controls to be hidden

Created on 20 Aug 2018  路  5Comments  路  Source: xamarin/Xamarin.Forms

Description

Sizing calculation changed between 3.1.0.697729 and 3.2.x-pre2. In 3.1.x the DesiredSize did not include the Margin. In 3.2.x the DesiredSize does include the margin. I noticed this when using a StackLayout that contains an SKCanvasView and Label. In 3.1 the label is visible, in 3.2 the label is not visible. I reproduced this using the SkiaSharpFormsDemos SimpleCirclePage.

Steps to Reproduce

  1. Run the sample code against 3.1 and 3.2 Xamarin.Forms.

Expected Behavior

3.1 - Both the skia drawing and label and button below are visible.

Actual Behavior

In 3.2 the label is hidden

Basic Information

Screenshots

Expected (functionality at 3.1)
3 1xamarinforms
Actual (functionality at 3.2 - note missing label)
3 2xamarinforms
DesiredSize Calculation at 3.1
3 1desiredsize
DesiredSize Calculation at 3.2 - now includes margin
3 2desiredsize

Reproduction Link

3.2ReproCode.txt

layout 5 regression bug

All 5 comments

Repro is available at https://github.com/hartez/xamarin-forms-samples/tree/xf-3616

That branch has the demo code and is currently set at 3.1 (working); update to 3.2.0.729530-pre2 and the label disappears.

@dbanta6 This looks to be fixed by this PR
https://github.com/xamarin/Xamarin.Forms/pull/3570

I've attached the nuget created from that PR if you want to test.
I tested locally and the text looks to show up now.

[win.zip](https://github.com/xamarin/Xamarin.Forms/files/2311761/win.zip

Thanks! I'll take a look at it today.

That fixed it. Thanks!

Yay! Thank you for the great report and for testing the package.

Was this page helpful?
0 / 5 - 0 ratings