locked
StackLayout Horizontal uneven content issue RRS feed

  • Question

  • User10758 posted

    Hi, I have a problem laying out two pieces of text in a stacklayout horizontal where the contents are uneven in size (I am using Forms 1.3 latest nuget stable).

    Before I submit as a bug I wanted to check I wasn't missing anything dumb. This is a standard Xam Forms shared project in VS, with just the app.cs modified as below.

    On WinPhone, the longer text overwrites content below. On Android and iOS the longer content is truncated (actually it's underneath the content below but hidden).

    I have tried various verticaloptions with no success. I was expecting the content of the horizontal stacklayout to be shown fully before any further content is shown.

    Thanks Russell

    ```` public App () { // The root page of your application MainPage = new ContentPage { Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5),

                Content = new StackLayout {
                    Children = {
                        new StackLayout {
                            Orientation = StackOrientation.Horizontal,
                            Children = {
                                new Label {
                                    Text = "This is a really short label on the left hand side."
                                },
                                new Label {
                                    Text = "This is a really long label on the right hand side. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
                                }
                            }
                        },
                        new Label {
                            Text = "This is a really long label underneath the other two. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
                        }
                    }
                }
            };
        }
    

    ````

    Tuesday, February 3, 2015 11:49 AM

All replies

  • User10758 posted

    Submitted to bugzilla https://bugzilla.xamarin.com/show_bug.cgi?id=26715

    Wednesday, February 4, 2015 9:01 AM