Bug 52389 - ArgumentException when applying padding to a StackLayout in a ViewCell
Summary: ArgumentException when applying padding to a StackLayout in a ViewCell
Status: RESOLVED DUPLICATE of bug 52533
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-02-08 16:20 UTC by Matthias
Modified: 2017-03-13 16:00 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

sample solution (309.43 KB, application/x-zip-compressed)
2017-02-08 16:22 UTC, Matthias

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Matthias 2017-02-08 16:20:59 UTC
Creating a VIewCell for a ListView like this:

<ListView x:Name="ListView">
                <StackLayout Padding="12"
                             BackgroundColor="{DynamicResource ExpandableSectionBackgroundColor}">
                    <Label Text="{Binding}"
                           Style="{DynamicResource ListItemTextStyle}" />
                    <Label Text="&gt;" />

results in a System.ArgumentException: "NaN is not a valid value for width".

This behavior is not perceived in the latest stable release.

Example solution attached.
Comment 1 Matthias 2017-02-08 16:22:10 UTC
Created attachment 19760 [details]
sample solution
Comment 2 Reuben Turk 2017-03-11 01:31:01 UTC
In my experience, the problem is specific to using Orientation="Horizontal".

If I remove that I do not get the error.
Comment 3 Reuben Turk 2017-03-11 02:58:44 UTC
Try 2.3.4-pre4. It seems to have fixed the issue for me.
Comment 4 Jimmy [MSFT] 2017-03-13 16:00:32 UTC

*** This bug has been marked as a duplicate of bug 52533 ***