Bug 41147 - Incorrect ScrollView layout is placed in a Grid
Summary: Incorrect ScrollView layout is placed in a Grid
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-18 09:42 UTC by Vladimir
Modified: 2016-10-10 23:01 UTC (History)
5 users (show)

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


Attachments
Illustrating project (208.17 KB, application/x-zip-compressed)
2016-08-15 13:35 UTC, Vladimir
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 for Bug 41147 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Vladimir 2016-05-18 09:42:53 UTC
With the latest version of Xamarin.Forms (2.2.0.31), this layout is displayed incorrectly (labels are invisible, only a red rectangle over the green background is visible) on WinPhone 8.1:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="SimpleTestApp.MainPage" BackgroundColor="Green">
  <Grid HorizontalOptions="Center" VerticalOptions="Center" IsClippedToBounds="true" BackgroundColor="Red">
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width ="*"/>
    </Grid.ColumnDefinitions>
    <ContentView Grid.Row="0" IsClippedToBounds="true" BackgroundColor="Yellow" HeightRequest="100" WidthRequest="200">
      <ScrollView IsClippedToBounds="true" HeightRequest="100" WidthRequest="200">
        <Grid BackgroundColor="Blue" HeightRequest="100" WidthRequest="200">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
          </Grid.ColumnDefinitions>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <Label Text="111" Grid.Column="0" Grid.Row="0"/>
          <Label Text="1112" Grid.Column="1" Grid.Row="0"/>
        </Grid>
      </ScrollView>
    </ContentView>
  </Grid>
</ContentPage>
Comment 1 E.Z. Hart [MSFT] 2016-07-08 21:38:49 UTC
Fixed as of 2.3.0.107; Windows Phone 8.1 now displays the same layout as Android and iOS.
Comment 2 Vladimir 2016-08-15 13:21:51 UTC
I have tested it both with the 2.3.0.107 and 2.3.1.114 versions of Xamarin.Forms, and the issue is still reproduced. Note that I am talking about the Windows Phone Silverlight 8.1 platform.
Comment 3 Vladimir 2016-08-15 13:35:15 UTC
Created attachment 17027 [details]
Illustrating project

I have attached a sample project that demonstrates this issue.
Comment 4 sven 2016-08-29 18:30:44 UTC
I'm having major problems with the ScrollView nested in other controls (on Windows Phone 8.0 Silverlight) too, very unpredictable behavior.
But in this particular example, the fix seems to remove the ContentView from the XAML, so just use the ScrollView in the Grid directly. Then it works correctly.