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

AttachedCardShadow with InnerContentClipMode == CompositionMaskBrush isn't correctly resized when the UIElement it's attached to changes size #4587

Closed
2 of 14 tasks
Ryken100 opened this issue Jun 28, 2022 · 3 comments · Fixed by #4588
Assignees
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 extensions ⚡ hotfix 🌶
Milestone

Comments

@Ryken100
Copy link

Describe the bug

When AttachedCardShadow.InnerContentClipMode is set to CompositionMaskBrush, and the size of the element it's attached to changes, the shadow isn't properly resized to match.

Regression

No response

Reproducible in sample app?

  • This bug can be reproduced in the sample app.

Steps to reproduce

1. Create a new blank UWP app.
2. Add a `Rectangle` to `MainPage.xaml`.
3. Attach an `AttachedCardShadow` to the `Rectangle` and set `InnerContentClipMode` to `CompositionMaskBrush`
4. Implement some way to change the size of the `Rectangle` (e.g. have it change size on click)
5. Observe that when the size of the `Rectangle` changes, some of the elements that make up the shadow do not change size to match, leading to a glitched appearance.

Expected behavior

All elements of the shadow should change size to match the UIElement it's attached to, without a glitched appearance.

Screenshots

Before the Rectangle is resized
image

After the Rectangle is resized
image

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

No response

Device form factor

Desktop

Nuget packages

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

@Ryken100 Ryken100 added the bug 🐛 An unexpected issue that highlights incorrect behavior label Jun 28, 2022
@ghost ghost added the needs triage 🔍 label Jun 28, 2022
@ghost
Copy link

ghost commented Jun 28, 2022

Hello Ryken100, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@ghost
Copy link

ghost commented Jul 13, 2022

This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established.

@michael-hawker
Copy link
Member

Was able to reproduce in the sample app with some tweaks to the implicit animation sample

            SampleController.Current.RegisterNewCommand("Size Element", (sender, args) =>
            {
                if (_element is FrameworkElement fwe)
                {
                    fwe.Width = _random.Next(200) + 100;
                    fwe.Height = _random.Next(200) + 100;
                }
            });

And using a Rectangle over a Border without the Canvas see #4739

@ghost ghost added Completed 🔥 and removed In-PR 🚀 labels Aug 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 extensions ⚡ hotfix 🌶
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants