dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

Changing view size/layout/position does not update the shadow #24476

Closed mattleibow closed 1 week ago

mattleibow commented 2 weeks ago

Description

I have some code:

<Border
    Grid.Row="1"
    Grid.ColumnSpan="2"
    VerticalOptions="End"
    Margin="0,0,0,24"
    HeightRequest="52"
    StrokeThickness="0"
    Background="#EEEEEE"
    StrokeShape="RoundRectangle 26"
    MaximumWidthRequest="300"
    HorizontalOptions="Center">
    <Border.Shadow>
        <Shadow
            Offset="0,25"
            Opacity="0.3"
            Radius="25"/>
    </Border.Shadow>

There are some items in the border, and if I change (for example) the HorizontalOptions to Fill or Center, the shadow just moves but n=does not reflect the bounds.

This is noticeable during hot reloading.

However, this appears to be working fine if I change the contents - such as hid/show - or other content things.

Steps to Reproduce

image

image

Link to public reproduction project repository

https://github.com/mattleibow/scorecard-day-nft-marketplace/tree/issues/shadow

Version with bug

9.0.0-preview.7.24407.4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 2 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kubaflo commented 2 weeks ago

Hi @mattleibow I think this pr might fix it: https://github.com/dotnet/maui/pull/24561