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

Path Shadow Not Working Consistently on Windows #8796

Open
DanChristy opened this issue Jul 18, 2022 · 2 comments
Open

Path Shadow Not Working Consistently on Windows #8796

DanChristy opened this issue Jul 18, 2022 · 2 comments
Assignees
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/windows 🪟 t/bug Something isn't working

Comments

@DanChristy
Copy link

Description

A shadow for a Path wants to square off instead of following the path. This will work properly when first setup but squares off the next time the application is launched on Windows.

What I expect to see:
Good

Here is what I see when running the application after stopping:
Bad

Here is the XAML:
XAML

The only way to get it to work properly again is to remove the Shadow and Background lines seen highlighted above and readd them; Background first, then the Shadow.

Steps to Reproduce

  • Create a new .NET MAUI application

  • Add the XAML depicted in the following screenshot (Or some curvy path and a shadow for it):
    XAML

  • Observe a shadow that follows the curve

  • Stop the program.

  • Run the program and observe a shadow that does not follow the curve.

<Grid.Resources> <Shadow x:Key="SharedShadow" Brush="Black" Offset="10,10" Radius="10" Opacity=".5"/> </Grid.Resources> <Path Data="m-0.8343,-0.56247l541.11421,1.57252l-0.57928,320.4051c1.61527,2.26977 -126.72043,73.10653 -233.88722,47.41002c-107.16679,-25.69651 -148.15234,-102.71863 -305.97166,-68.1379l-0.67605,-301.24974z" Opacity="1" VerticalOptions="FillAndExpand" Background="Transparent" Shadow="{StaticResource SharedShadow}" Fill="{StaticResource PrimaryButtonGradient}" Aspect="Fill"> </Path>

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

.net6.0-windows10.0.19041.0

Did you find any workaround?

No response

Relevant log output

No response

@DanChristy DanChristy added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Jul 18, 2022
@jsuarezruiz jsuarezruiz self-assigned this Jul 18, 2022
@jsuarezruiz jsuarezruiz added area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/windows 🪟 s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Jul 18, 2022
@jsuarezruiz jsuarezruiz added this to the 6.0-servicing milestone Jul 18, 2022
@Redth Redth modified the milestones: 6.0-servicing, 7.0-rc2 Aug 30, 2022
@Redth Redth modified the milestones: 7.0-rc2, 7.0 Sep 14, 2022
@PureWeen PureWeen modified the milestones: 7.0, .NET 7 + Servicing Sep 28, 2022
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 5, 2023
@Qythyx
Copy link

Qythyx commented Apr 19, 2023

I'm not sure if this should be part of this issue or reported as a new issue, but I'm also seeing that shadows render differently between iOS and Android.

For example, the following XAML renders as shown in this image. Android is the left and iOS the right. As you can see, the shadows are very similar in the image, but the Radius and Offset values are very different for Android and iOS. It would be better if the same values rendered the same on different platforms.

image

	<Border
		Grid.Row="1"
		Margin="10"
		Padding="2"
		Background="#FFB300"
		HeightRequest="54"
		HorizontalOptions="End"
		StrokeShape="Ellipse"
		StrokeThickness="0"
		VerticalOptions="End"
		WidthRequest="54">
		<Border.Shadow>
			<OnPlatform x:TypeArguments="Shadow">
				<On Platform="iOS">
					<Shadow
						Brush="#77000000"
						Radius="3"
						Offset="3,3" />
				</On>
				<On Platform="Android">
					<Shadow
						Brush="#77000000"
						Radius="8"
						Offset="8,8" />
				</On>
			</OnPlatform>
		</Border.Shadow>
		<ImageButton
			BackgroundColor="Transparent"
			Clicked="OnChangeQuantityClicked"
			Source="{Binding FabImage}" />
	</Border>

@bcaceiro
Copy link

bcaceiro commented Mar 7, 2024

the shadows still are rendered way too differently between iOS and Android ( the previous was closed) Any news on this matter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants