Bug 26715 - StackLayout Horizontal uneven content issue
Summary: StackLayout Horizontal uneven content issue
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-04 04:00 UTC by rjcollingham
Modified: 2015-02-16 07:45 UTC (History)
4 users (show)

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


Attachments
Sample App (264.47 KB, application/octet-stream)
2015-02-04 07:46 UTC, Udham Singh
Details


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:
Status:
VERIFIED FIXED

Description rjcollingham 2015-02-04 04:00:48 UTC
See this thread http://forums.xamarin.com/discussion/32157/stacklayout-horizontal-uneven-content-issue for the screenshots on all 3 platforms.

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).

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."
                        }
                    }
                }
            };
        }
Comment 1 Udham Singh 2015-02-04 07:46:25 UTC
Created attachment 9638 [details]
Sample App

I have checked this issue with the help of code given in bug description and able to reproduce the reported behavior. I am attaching a sample app which I have created to reproduce this issue.

Screencast (Android) : http://www.screencast.com/t/pq6y0Up3RY
Screencast (Windows Phone) : http://www.screencast.com/t/guMWO9oWxB
Screencast (iOS) : http://www.screencast.com/t/Pd6rh8k1rUD

Environment Info : 

Xamarin.Forms : 1.3.3.6318-pre1

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.9.291.0 (9f3e552)
Comment 2 Jason Smith [MSFT] 2015-02-13 07:41:35 UTC
This is fixed in 1.3.4-pre4
Comment 3 Udham Singh 2015-02-16 07:45:21 UTC
I have checked this issue with following builds

Environment Info : 

Xamarin.Forms.1.3.4.6331-pre4

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.9.325

Now this is working fine, Hence closing this issue.

Screencast (Android) : http://www.screencast.com/t/tgUGCEFmu
Screencast (Windows Phone) : http://www.screencast.com/t/FEQfXUjCOx
Screencast (iOS) : http://www.screencast.com/t/ujq75YoOp6m