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

Label Shadow not working correctly on Windows #6150

Closed
pierre01 opened this issue Apr 16, 2022 · 7 comments · Fixed by #6608
Closed

Label Shadow not working correctly on Windows #6150

pierre01 opened this issue Apr 16, 2022 · 7 comments · Fixed by #6608
Assignees
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/windows 🪟 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@pierre01
Copy link

pierre01 commented Apr 16, 2022

Description

The label shadow does not render at the location of the label neither does it render in the right size

image

Steps to Reproduce

Create a label : the example in the image above is in a template for a collectionView

<Label 
                        Style="{StaticResource FoodCategoriesLabel}"
                        Text="{Binding Name}" >
                            <Label.Shadow >
                                <Shadow Offset="0,0"
                                Opacity="1" 
                                Radius="2" Brush="Black" >
                                </Shadow>
                            </Label.Shadow>
                        </Label>

Expected :The Shadow should appear underneath the label with the same character size

Result: see image above

Version with bug

Release Candidate 1 (current)

Last version that worked well

Works on Android not windows.

Affected platforms

Windows

Affected platform versions

Windows 11 Pro 22000.408

Did you find any workaround?

No

Relevant log output

No response

@pierre01 pierre01 added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Apr 16, 2022
@shimingsg
Copy link

@pierre01 , could you share the style of FoodCategoriesLabel which can help us to reproduce this issue?

@pierre01
Copy link
Author

pierre01 commented Apr 20, 2022

@shimingsg
` <Style x:Key="FoodCategoriesLabel" TargetType="Label">

            <Setter Property="TextColor" Value="#FFFFFF" />
            
            <Setter Property="FontFamily" Value="DancingScriptRegular" />
            
            <Setter Property="FontSize" Value="48"  />
            
            <Setter Property="FontAttributes" Value="Bold"  />
            
            <Setter Property="HorizontalTextAlignment" Value="Center" />
            
            <Setter Property="VerticalTextAlignment" Value="Center" />
            
        </Style>`

@shimingsg
Copy link

@pierre01 , sorry I don't have windows 11.
please see my demo that seems the shadow works fine, my environment is
VS: 17.3.0 Preview 1.0 [32417.43.main]
Windows: Windows 10 10.0.19044 N/A Build 19044
image

here is my demo project for your reference, I'd like to suggest to verify if the latest VS has the same issue on your environment.
MauiApp13.zip

@shimingsg shimingsg added the s/verified Verified / Reproducible Issue ready for Engineering Triage label Apr 20, 2022
@pierre01
Copy link
Author

pierre01 commented Apr 20, 2022

Compiling your code I get an error: 1>C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.300-rc.1.5355\targets\Microsoft.Maui.Resizetizer.targets(571,9): error : ApplicationId 'com.companyname.mauiapp99875' was not a valid GUID. Windows apps use a GUID for an application ID instead of the reverse domain used by Android and/or iOS apps.

Edit
I replaced with
07B0CC58-FEC6-47E0-8BE5-1D169A4EA0F9

@pierre01
Copy link
Author

pierre01 commented Apr 20, 2022

@shimingsg Thanks for taking the time to reproduce the issue... Your code works

But the example I used does not work on windows (it does work on android).

Now, I wonder if the issue is caused by the images in the background of the CollectionView Items.

@pierre01
Copy link
Author

pierre01 commented Apr 20, 2022

@shimingsg
image
Yes it is...
MauiApp13.zip
.

@pierre01
Copy link
Author

Putting an image in the background of the CollectionView ItemTemplate causes the bug.

@Redth Redth added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Apr 20, 2022
@Redth Redth added this to the 6.0.300 milestone Apr 20, 2022
@samhouts samhouts removed the s/needs-verification Indicates that this issue needs initial verification before further triage will happen label Apr 21, 2022
@jsuarezruiz jsuarezruiz added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Apr 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2022
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/windows 🪟 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants