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 does not honour Styles #19560

Open
jameslavery opened this issue Dec 22, 2023 · 4 comments · May be fixed by #20203
Open

Shadow does not honour Styles #19560

jameslavery opened this issue Dec 22, 2023 · 4 comments · May be fixed by #20203
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 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

@jameslavery
Copy link

Description

If I use a Shadow, and update the appropriate Style in Styles.xaml, the shadow does not apply the properties set in the style.

For example, if I change the entry in Styles.xaml to have a Red brush:

    <Style
        TargetType="Shadow">
        <Setter Property="Radius" Value="15" />
        <Setter Property="Opacity" Value="0.5" />
        <Setter Property="Brush" Value="Red" />
        <Setter Property="Offset" Value="10,10" />
    </Style>

I would expect all Shadows to be red. They remain with their default colour.

Steps to Reproduce

  1. Create a new MAUI project.
  2. Amend the Style in Styles.xaml, with TargetType of "Shadow", to have a Red Brush.
  3. Add a Shadow to a control.
  4. The Shadow is not red when the application runs and renders the Shadow.

Link to public reproduction project repository

https://github.com/jameslavery/MauiShadowTestApp

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, Windows, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No. Apart from setting the Shadow's attributes locally on each ContentPage/ContentView, thus not making use of Styles.

Relevant log output

No response

@jameslavery jameslavery added the t/bug Something isn't working label Dec 22, 2023
@samhouts samhouts added the area-xaml XAML, CSS, Triggers, Behaviors label Jan 4, 2024
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jan 23, 2024
@XamlTest
Copy link

XamlTest commented Jan 23, 2024

Verified this on Visual Studio Enterprise 17.9.0 Preview 3(8.0.3). Repro on Windows 11, Android 14.0-API34, iOS 17.0 and MacCatalyst with below Project:

ShadowTestApp.zip
image

kubaflo added a commit to kubaflo/maui that referenced this issue Jan 28, 2024
@kubaflo kubaflo linked a pull request Jan 28, 2024 that will close this issue
@kubaflo
Copy link
Contributor

kubaflo commented Jan 28, 2024

@jameslavery @samhouts
The PR with a fix: #20203 :)

@jameslavery
Copy link
Author

Great work - thank you.

@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 4, 2024
kubaflo added a commit to kubaflo/maui that referenced this issue Jun 11, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@softlion
Copy link
Contributor

softlion commented Sep 5, 2024

not in maui 8 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 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.

6 participants