close
Skip to content

Fixing box with corner radius doesn't have shadow#15613

Merged
protikbiswas100 merged 2 commits into
mainfrom
15604-shadowbox
Feb 3, 2026
Merged

Fixing box with corner radius doesn't have shadow#15613
protikbiswas100 merged 2 commits into
mainfrom
15604-shadowbox

Conversation

@protikbiswas100

@protikbiswas100 protikbiswas100 commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

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.

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
Microsoft Reviewers: Open in CodeFlow

@protikbiswas100 protikbiswas100 requested review from a team as code owners February 2, 2026 08:47
@protikbiswas100

Copy link
Copy Markdown
Contributor Author

/azp run PR

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 1 pipeline(s).

@iamAbhi-916 iamAbhi-916 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@protikbiswas100 protikbiswas100 merged commit baa67da into main Feb 3, 2026
30 checks passed
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.

[React Native] [AK1] [60873959] Bug 3 Box Shadow with Corner Radius

2 participants