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

Border shadow not rendered correctly #19312

Open
pikausp opened this issue Dec 8, 2023 · 2 comments
Open

Border shadow not rendered correctly #19312

pikausp opened this issue Dec 8, 2023 · 2 comments
Labels
area-controls-border Border area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@pikausp
Copy link

pikausp commented Dec 8, 2023

Description

Different combinations of border placement and background color produce different-looking shadows.

Steps to Reproduce

Tested the following combinations

  • Border without background inside a scrollview
  • Border without background inside grid inside a scrollview
  • Border without background
  • Border with background inside a scrollview
  • Border with background inside grid inside a scrollview
  • Border with background

image

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ShadowInsideScrollView.MainPage">
    <ContentPage.Resources>

        <Style TargetType="Border">
            <Setter Property="Margin"
                    Value="20" />
            <Setter Property="StrokeShape"
                    Value="{RoundRectangle CornerRadius=20}" />
            <Setter Property="Shadow">
                <Setter.Value>
                    <Shadow Brush="Black"
                            Offset="20,20"
                            Radius="10"
                            Opacity="1"/>
                </Setter.Value>
            </Setter>
        </Style>
    </ContentPage.Resources>

    <Grid RowDefinitions="*, *, *, *, *, *"
          RowSpacing="10">
        <ScrollView>
            <Border />
        </ScrollView>

        <ScrollView Grid.Row="1">
            <Grid>
                <Border />
            </Grid>
        </ScrollView>

        <Border Grid.Row="2" />

        <ScrollView Grid.Row="3">
            <Border BackgroundColor="White" />
        </ScrollView>

        <ScrollView Grid.Row="4">
            <Grid>
                <Border BackgroundColor="White" />
            </Grid>
        </ScrollView>

        <Border BackgroundColor="White"
                Grid.Row="5"/>
    </Grid>

</ContentPage>

Link to public reproduction project repository

https://github.com/pikausp/ShadowInsideScrollView

Version with bug

8.0.3

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

Android 14

Did you find any workaround?

No response

Relevant log output

No response

@pikausp pikausp added the t/bug Something isn't working label Dec 8, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Dec 11, 2023
@PureWeen PureWeen added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 labels Dec 21, 2023
@PureWeen PureWeen added this to the Backlog milestone Dec 21, 2023
@ghost
Copy link

ghost commented Dec 21, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jan 10, 2024
@XamlTest
Copy link
Collaborator

XamlTest commented Jan 10, 2024

Verified this on Visual Studio Enterprise 17.9.0 Preview 2(8.0.3). Border shadow not rendered different on Windows, Android 14.0-API34, iOS 17.0 and MacCatalyst.
Project: ShadowInsideScrollView.zip

Windows:
image

Android 14.0-API34:
image

iOS 17.0:
Screenshot 2024-01-10 at 5 52 30 PM

MacCatalyst:
Screenshot 2024-01-10 at 5 52 57 PM

@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-border Border area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants