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

[regression/8.0.0-preview.5.8529] - WinUI shadows are broken #16094

Closed
Stedy59 opened this issue Jul 11, 2023 · 3 comments · Fixed by #16895
Closed

[regression/8.0.0-preview.5.8529] - WinUI shadows are broken #16094

Stedy59 opened this issue Jul 11, 2023 · 3 comments · Fixed by #16895
Assignees
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Stedy59
Copy link

Stedy59 commented Jul 11, 2023

Description

Add shadows to standard controls...
image

		`<Button
			x:Name="RoundBtn"
			HorizontalOptions="Center"
			Text="Shadow"
			CornerRadius="60"
			HeightRequest="120"
			WidthRequest="120">
			<Button.Shadow>
				<Shadow
					Brush="Black"
					Opacity="1"
					Radius="10"
					Offset="0,0" />
			</Button.Shadow>
		</Button>`

		`<Editor Text="All shadow - No text!!!">
			<Editor.Shadow>
				<Shadow
					Brush="Black"
					Opacity="1"
					Radius="10"
					Offset="0,0" />
			</Editor.Shadow>
		</Editor>`

Steps to Reproduce

  1. Create a new .net Maui app
  2. Add Shadow properties to standard elements

Link to public reproduction project repository

n/a - just add shadows to elements

Version with bug

8.0.0-preview.5.8529

Last version that worked well

7.0.86

Affected platforms

Windows

Affected platform versions

Windows SDK - all

Did you find any workaround?

no

Relevant log output

No response

@Stedy59 Stedy59 added the t/bug Something isn't working label Jul 11, 2023
@jsuarezruiz jsuarezruiz added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Jul 12, 2023
@jsuarezruiz
Copy link
Contributor

Quick test in main branch using .NET 7:

test-shadow-win-net7

Works correctly, next will test the same with .NET 8.

@jfversluis jfversluis added platform/windows 🪟 i/regression This issue described a confirmed regression on a currently supported version labels Jul 12, 2023
@Stedy59
Copy link
Author

Stedy59 commented Jul 12, 2023

@jfversluis , @jsuarezruiz

I don't know how better to show what I am building, and the issues I am running so...
Here is a link to a video that shows Windows / Android side by side...

https://youtu.be/-BrKbE_Ve8Y

Inspired by both of your works... All custom using Handlers/Mappers

NavigationPage, NavigationBar with CRUD, TabView, SlidingPanel, DialogView, MessageBox, ComboBox, MediaSelection, etc.

Complete control and access to colors/fonts/shadows/animations from Maui layer to and including platform layer for the developer!

@Redth Redth added this to the .NET 8 GA milestone Jul 12, 2023
@samhouts samhouts changed the title .NET 8.0 Preview 5/6 - WinUI shadows are broken [regression/8.0.0-preview.5.8529] - WinUI shadows are broken Aug 1, 2023
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Aug 4, 2023
@XamlTest
Copy link

XamlTest commented Aug 4, 2023

Verified this on Visual Studio Enterprise 17.7.0 Preview 6.0. Repro on Windows 11 .NET 8, not repro on Android 13.0-API33 and iOS 16.4 with below Project:
16094.zip

Windows:
image
Android:
image
iOS:
image

@emaf emaf self-assigned this Aug 9, 2023
emaf added a commit that referenced this issue Aug 20, 2023
The shadow mask needs to be updaded with the shadow properties, because if the size or shape of the object changed the mask needs to be updated accordingly.

This fixes a regression, but brings back another problem: shadows won't work for borders with no content (#13944). The workaround for that scenario is to add content or a background color to the border.

Fixes #16094
emaf added a commit that referenced this issue Aug 21, 2023
The shadow mask needs to be updaded with the shadow properties, because if the size or shape of the object changed the mask needs to be updated accordingly.

This fixes a regression, but brings back another problem: shadows won't work for borders with no content (#13944). The workaround for that scenario is to add content or a background color to the border.

Fixes #16094
PureWeen pushed a commit that referenced this issue Aug 22, 2023
* [WinUI] Update shadow mask as part of shadow properties

The shadow mask needs to be updaded with the shadow properties, because if the size or shape of the object changed the mask needs to be updated accordingly.

This fixes a regression, but brings back another problem: shadows won't work for borders with no content (#13944). The workaround for that scenario is to add content or a background color to the border.

Fixes #16094

* Use FireAndForget instead of async void

* Fix spacing issues
@ghost ghost locked as resolved and limited conversation to collaborators Sep 21, 2023
@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Jan 31, 2024
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 fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 i/regression This issue described a confirmed regression on a currently supported version platform/windows 🪟 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

Successfully merging a pull request may close this issue.

7 participants