Has anybody else hit a problem with BackgroundColor on StackLayout on WinPhone when using Spacing?

JohnHardmanJohnHardman GBUniversity mod

I am hitting a strange problem on WinPhone, where the BackgroundColor of a StackLayout is being ignored when the number of entries in the StackLayout goes over a certain number (when my app hits 57 children of the StackLayout, but remembering that some of those children have children of their own). The StackLayout is created as follows (I have hard-coded the color and spacing to assist in debugging. On iOS this works fine, but on WinPhone the moment the number of entries hits that threshold, the BackgroundColor on WinPhone switches to Black (presumably Color.Default?).

Has anybody else encountered this?

                menuStackLayout = new StackLayout
                {
                    BackgroundColor = Color.Maroon,
                    ClassId = "MyApp_ClassId_StackLayout",
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    IsEnabled = true,
                    IsVisible = true,
                    Orientation = StackOrientation.Vertical,
                    Padding = 0,
                    Spacing = 50,
                    StyleId = kmr.StyleId,
                    VerticalOptions = LayoutOptions.FillAndExpand
                };

Thanks,

John H.

Answers

  • JohandePunderJohandePunder NLBeta, University

    We have the same problem. Did you find a solution for this?

    Johan.

  • JohnHardmanJohnHardman GBUniversity mod

    @JohandePunder - I did raise a bug for this at https://bugzilla.xamarin.com/show_bug.cgi?id=31107 . However, it's way down my priority list so I haven't created a sample project to reproduce it yet, so the Xamarin team aren't actioning it yet. If you have a sample that reproduces this could you attach it to that bug and change the status on the bug back to NEW please.

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @JohnHardman - just fyi that only Xamarin or the original bug reporter can change the status of a bug, which is really annoying because it means you have to file a new bug if the original reporter is no longer around.

  • JohnHardmanJohnHardman GBUniversity mod

    @AdamP - Thanks for that. Didn't realise that.

    @JohandePunder - If you can add any info you have to the bug, I'll change the status afterwards. Just tag me here so that I remember to do it :-)

Sign In or Register to comment.