Bug 60742 - Label color inside nested CompressedLayout.IsHeadless="true" skips TextColor property.
Summary: Label color inside nested CompressedLayout.IsHeadless="true" skips TextColor ...
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-17 22:41 UTC by Mario Galván
Modified: 2017-12-14 21:21 UTC (History)
2 users (show)

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


Attachments
Image of the bug. (1.14 MB, image/png)
2017-11-17 22:41 UTC, Mario Galván
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:
RESOLVED NORESPONSE

Description Mario Galván 2017-11-17 22:41:34 UTC
Created attachment 25749 [details]
Image of the bug.

Using this layout inside a Xamarin.Forms.ContenPage the first Label inside the Grid skips the TextColor property:

<Grid CompressedLayout.IsHeadless="true">
    <Grid CompressedLayout.IsHeadless="true">
        <cachedImage:CachedImage
            ErrorPlaceholder="{StaticResource PlaceholderImage}"
            HorizontalOptions="FillAndExpand"
            VerticalOptions="FillAndExpand"
            Source="{Binding HighResPosterPath}"
            Aspect="AspectFill">
        </cachedImage:CachedImage>
        <BoxView
            BackgroundColor="{StaticResource CoverColor}" />
    </Grid>
    <StackLayout
        Spacing="8"
        CompressedLayout.IsHeadless="true"
        VerticalOptions="EndAndExpand">
        <Grid ColumnSpacing="1" CompressedLayout.IsHeadless="true">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.78*" />
                <ColumnDefinition Width="0.05*" />
                <ColumnDefinition Width="0.17*" />
            </Grid.ColumnDefinitions>
            <!-- Here! -->
            <Label
                Grid.Column="0"
                Text="{Binding Title}"
                HorizontalTextAlignment="Start"
                LineBreakMode="TailTruncation"
                Margin="20,0"
                VerticalTextAlignment="Center"
                FontAttributes="Bold"
                TextColor="White" 
                FontSize="24"/>
            <Image
                Source="star.png"
                Grid.Column="1"
                HeightRequest="20"
                WidthRequest="20"/>
            <Label
                Grid.Column="2"
                VerticalTextAlignment="Center"
                Text="{Binding VoteAverage}"
                HorizontalTextAlignment="End"
                Margin="0,0,20,0"
                TextColor="White"
                FontSize="20" />
        </Grid>
        <BoxView
            Margin="20,0,0,0"
            HeightRequest="1"
            HorizontalOptions="FillAndExpand"
            BackgroundColor="White" />
        <Label
            Text="{Binding Overview}"
            HorizontalTextAlignment="Start"
            Margin="20,18,20,30"
            FontSize="18"
            TextColor="White"/>
    </StackLayout>
</Grid>
Comment 1 Paul DiPietro [MSFT] 2017-11-20 22:22:33 UTC
I don't have access to the things like the image in that snippet, so removing that, I can see the text if I explicitly set the colors to something more visible/not white (if I leave the background white, due to no image) with manually set text values. Can you provide a full reproduction?
Comment 2 Paul DiPietro [MSFT] 2017-12-14 21:21:46 UTC
This will be closed for the time being due to the lack of a response. Please reopen this when you are able to provide a reproduction project if the issue is still occurring as of the latest stable build. Thanks!