maui icon indicating copy to clipboard operation
maui copied to clipboard

[Catalyst] Fix brushes in Frame

Open jsuarezruiz opened this issue 2 years ago • 3 comments

Description of Change

Brushes were not rendering on the Frame in Catalyst. The issue is that we weren't updating the size of the Layer used to draw the gradient when resizing the UIView.

Captura de Pantalla 2022-06-10 a las 12 06 33

Issues Fixed

Fixes #7261 Fixes #8108 Fixes #8402

jsuarezruiz avatar Jun 10 '22 10:06 jsuarezruiz

Rebase to net6.0? @jsuarezruiz

PureWeen avatar Jun 28 '22 17:06 PureWeen

Rebase to net6.0? @jsuarezruiz

Done.

jsuarezruiz avatar Jun 29 '22 12:06 jsuarezruiz

As a workaround, you can replace Frame with ContentView to see if it also works for you: Example code:

<ContentView
                HeightRequest="120"
                HorizontalOptions="FillAndExpand"
                Margin="-2"
                Padding="20, 45, 20, 0">
            <ContentView.Background>
                <LinearGradientBrush>
                    <GradientStop Color="#00A7B5" Offset="0.1" />
                    <GradientStop Color="#721474" Offset="1.0" />
                </LinearGradientBrush>
            </ContentView.Background>
</ContentView>

If you need border, border radius and shadow, you can combine ContentView with Border and Shadow MAUI elements.

hermben avatar Sep 19 '22 20:09 hermben

Changed target from net6.0 to main and rebased changes.

jsuarezruiz avatar Nov 22 '22 13:11 jsuarezruiz

/backport to net7.0

Redth avatar Dec 08 '22 15:12 Redth

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/3649773298

github-actions[bot] avatar Dec 08 '22 15:12 github-actions[bot]