Skip to content

[Android & iOS] Shadows & Gradients don't work with a list view's header/footer #26636

@kubaflo

Description

@kubaflo

Description

The following code doesn't work as expected, and like the collection view does:

<ListView
        VerticalOptions="Center"
        HeightRequest="300">
        <ListView.Header>
                <Label 
                        FontSize="16"
                        AutomationId="HeaderLabel"
                        HorizontalTextAlignment="Center"
                        Text="(Header) This is a border with shadows">
                        <Label.Background>
                                <LinearGradientBrush
                                        StartPoint="0, 0"
                                        EndPoint="1, 1">
                                        <LinearGradientBrush.GradientStops>
                                                <GradientStop Color="#8A2387"
                                                                Offset="0.1"/>
                                                <GradientStop Color="#E94057"
                                                                Offset="0.6"/>
                                                <GradientStop Color="#F27121"
                                                                Offset="1.0"/>
                                        </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>
                        </Label.Background>
                </Label>
        </ListView.Header>
        <ListView.Footer>
                <Label
                        FontSize="16"
                        HorizontalTextAlignment="Center"
                        Text="(Footer) This is a label with shadows">
                        <Label.Shadow>
                                <Shadow
                                        Brush="Green"
                                        Radius="4"
                                        Offset="0,4"/>
                        </Label.Shadow>
                </Label>
        </ListView.Footer>
</ListView>

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.21 SR2.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions