Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background gradients don't work for some views #25193

Open
kubaflo opened this issue Oct 11, 2024 · 1 comment · May be fixed by #25194
Open

Background gradients don't work for some views #25193

kubaflo opened this issue Oct 11, 2024 · 1 comment · May be fixed by #25194
Labels
platform/iOS 🍎 t/bug Something isn't working

Comments

@kubaflo
Copy link
Contributor

kubaflo commented Oct 11, 2024

Description

The following code:

    <VerticalStackLayout>

        <Label Text="Label: "/>
        <Label
            Text="Hello, Maui!"
            AutomationId="label">
            <Label.Background>
                <LinearGradientBrush EndPoint="1,0">
                    <GradientStop Color="Red"
                                  Offset="0.7"/>
                    <GradientStop Color="Green"
                                  Offset="1.0"/>
                </LinearGradientBrush>
            </Label.Background>
        </Label>

        <Label Text="Button: "/>
        <Button Text="Hello, Maui!">
            <Button.Background>
                <LinearGradientBrush EndPoint="1,0">
                    <GradientStop Color="Blue"
                                  Offset="0.7"/>
                    <GradientStop Color="Yellow"
                                  Offset="1.0"/>
                </LinearGradientBrush>
            </Button.Background>
        </Button>

        <Label Text="Entry: "/>
        <Entry Text="Hello, Maui!">
            <Entry.Background>
                <LinearGradientBrush EndPoint="1,0">
                    <GradientStop Color="Pink"
                                  Offset="0.7"/>
                    <GradientStop Color="Lime"
                                  Offset="1.0"/>
                </LinearGradientBrush>
            </Entry.Background>
        </Entry>

        <Label Text="Picker: "/>
        <Picker
            Title="Hello, Maui!">
            <Picker.Background>
                <LinearGradientBrush EndPoint="1,0">
                    <GradientStop Color="Brown"
                                  Offset="0.7"/>
                    <GradientStop Color="Gold"
                                  Offset="1.0"/>
                </LinearGradientBrush>
            </Picker.Background>
        </Picker>


        <Label Text="Scroll view: "/>
        <ScrollView Orientation="Horizontal"
                    HeightRequest="100">
            <ScrollView.Background>
                <LinearGradientBrush StartPoint="0,0.5"
                                     EndPoint="1,0.5">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Color="Orange"
                                      Offset="0.75"/>
                        <GradientStop Color="Purple"
                                      Offset="1"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </ScrollView.Background>

            <Border WidthRequest="1200"/>
        </ScrollView>

    </VerticalStackLayout>

gives the following results on iOS

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.91 SR9.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@kubaflo kubaflo added the t/bug Something isn't working label Oct 11, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@kubaflo kubaflo linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant