Skip to content

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

@Ryken100

Description

@Ryken100

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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions