Skip to content

Conversation

@protikbiswas100
Copy link
Contributor

@protikbiswas100 protikbiswas100 commented Jan 29, 2026

Description

The boxShadow style property does not render when borderRadius is also set on a View. Only one attribute works at a time - the shadow is ignored if both are present

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

In composition, when a geometric clip is applied to a visual for borderRadius, the clip affects both the visual content AND its DropShadow Since shadows extend outside the visual bounds, the shadow gets clipped and becomes invisible.

Resolves [https://github.com//issues/15604]

What

CompositionSwitcher.idl: Added Mask() and SourcePolicy() methods to IDropShadow interface
CompositionContextHelper.cpp: Implemented Mask() and SourcePolicy() in CompDropShadow, added CompositionDropShadowSourcePolicy type mappings
CompositionViewComponentView.cpp: Updated applyShadowProps() to conditionally use the mask approach when borderRadius is present

Screenshots

Before

15604-before

After
15604-after

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Changelog

Should this change be included in the release notes: yes

Fixed issue where box with corner radius doesn't have shadow

Microsoft Reviewers: Open in CodeFlow

@protikbiswas100 protikbiswas100 requested review from a team as code owners January 29, 2026 10:15
@protikbiswas100
Copy link
Contributor Author

/azp run PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@acoates-ms
Copy link
Contributor

Please make sure this makes it to main and 0.82 too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants