Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>