Skip to content

Comments

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

Merged
protikbiswas100 merged 9 commits into0.82-stablefrom
15604-shadowbox-0.82
Feb 17, 2026
Merged

Fixing box with corner radius doesn't have shadow#15614
protikbiswas100 merged 9 commits into0.82-stablefrom
15604-shadowbox-0.82

Conversation

@protikbiswas100
Copy link
Contributor

@protikbiswas100 protikbiswas100 commented Feb 2, 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.

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

@protikbiswas100 protikbiswas100 requested review from a team as code owners February 2, 2026 08:55
@microsoft microsoft deleted a comment from azure-pipelines bot Feb 3, 2026
@microsoft microsoft deleted a comment from azure-pipelines bot Feb 3, 2026
@microsoft microsoft deleted a comment from azure-pipelines bot Feb 3, 2026
@microsoft microsoft deleted a comment from azure-pipelines bot Feb 3, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Feb 3, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity Issue/PR has gone stale and may be closed (label applied by bot) label Feb 10, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot removed Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) no-recent-activity Issue/PR has gone stale and may be closed (label applied by bot) labels Feb 11, 2026
@protikbiswas100
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@protikbiswas100
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@protikbiswas100 protikbiswas100 merged commit 430ab4c into 0.82-stable Feb 17, 2026
56 checks passed
@iamAbhi-916 iamAbhi-916 deleted the 15604-shadowbox-0.82 branch February 17, 2026 14:14
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.

4 participants