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

Shadow not displaying properly in Border #13944

Closed
jknaudt21 opened this issue Mar 14, 2023 · 1 comment · Fixed by #13959
Closed

Shadow not displaying properly in Border #13944

jknaudt21 opened this issue Mar 14, 2023 · 1 comment · Fixed by #13959
Assignees
Labels
area-controls-border Border fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! platform/windows 🪟 t/bug Something isn't working

Comments

@jknaudt21
Copy link
Contributor

jknaudt21 commented Mar 14, 2023

Description

I'm trying to add a <Shadow> to a border and there are a couple of issues that I'm encountering.

  1. If the border is transparent (i.e doesn't BorderBackground set) the border will not display a shadow in Windows or will display a grey rectangle on Android
Screenshots

image
image

  1. If the border has variable height and width using Minimum/Maximum width requests, the border will render completely off in Windows and will not move if the window is resized. Moreover, if I were to resize my screen, the shadow will sometimes update but it will not move with the border I'm manipulating. On Android the shadow will just display in the same fashion as in point 1
Screenshots

image
image

Steps to Reproduce

  1. Create a new Maui Project
  2. Add these lines:
    <ScrollView>
        <Border Stroke="Green"
                    StrokeThickness="1"
                    BackgroundColor="White"
                    MaximumHeightRequest="400"
                    MaximumWidthRequest="500"
                    MinimumHeightRequest="300"
                    MinimumWidthRequest="400">
                <Border.Shadow>
                    <Shadow Brush="Black"
                        Radius="40"
                        Opacity="0.8"/>
                </Border.Shadow>
        </Border>
    </ScrollView>
  1. Build and run the project
  2. Remove the BackgroundColor property in Windows and the border will disappear

Link to public reproduction project repository

https://github.com/jknaudt21/MauiIssues
See "ShadowBug" folder

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows

Affected platform versions

Windows 11, Android API 33

Did you find any workaround?

One can add a determined HeightRequest and WidthRequest to the border to minimize the errors in Windows. I haven't found a workaround in Android.

Relevant log output

No response

@jknaudt21 jknaudt21 added t/bug Something isn't working area-controls-border Border labels Mar 14, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 14, 2023
@jsuarezruiz jsuarezruiz self-assigned this Mar 15, 2023
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Mar 15, 2023
@ghost
Copy link

ghost commented Mar 15, 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.

@samhouts samhouts added the fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! label Apr 12, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2023
@samhouts samhouts modified the milestones: Backlog, .NET 8 May 24, 2023
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-border Border fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants