-
Couldn't load subscription status.
- Fork 1.4k
Add custom alpha mask support to DropShadowPanel #4107
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
Add custom alpha mask support to DropShadowPanel #4107
Conversation
|
Thanks arcadiogarcia for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
|
Thanks @arcadiogarcia! We're working on some new Drop Shadow stuff too (outside DropShadowPanel), hopefully will have a PR for that open soon. So we should coordinate and see if this neat interface trick can work there too. Should know more by next week I think? I'll convert this to a draft for now until we sync on coordination. |
| /// <summary> | ||
| /// Any user control can implement this interface to provide a custom alpha mask to it's parent <see cref="DropShadowPanel"/> | ||
| /// </summary> | ||
| public interface IAlphaMaskProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to the Microsoft.Toolkit.Uwp.UI library? (Helpers folder I think would be fine.)
If no namespace is provided where does it end up, the root of the assembly's one? (It should just live in the root UI namespace.)
| using Windows.UI.Composition; | ||
|
|
||
| /// <summary> | ||
| /// Any user control can implement this interface to provide a custom alpha mask to it's parent <see cref="DropShadowPanel"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think there's no namespace the comment can't be resolved properly?
D:\a\1\s\Microsoft.Toolkit.Uwp.UI.Controls.Core\DropShadowPanel\IAlphaMaskProvider.cs(8,108): error CS1574: XML comment has cref attribute 'DropShadowPanel' that could not be resolved [D:\a\1\s\Microsoft.Toolkit.Uwp.UI.Controls.Core\Microsoft.Toolkit.Uwp.UI.Controls.Core.csproj]
Once moved though we won't be able to reference the control directly anyway, just in text.
|
@arcadiogarcia mind making the quick file move and addressing the comments and we can get this in? Thanks! |
Microsoft.Toolkit.Uwp.UI.Controls.Core/DropShadowPanel/DropShadowPanel.cs
Show resolved
Hide resolved
|
|
||
| using Windows.UI.Composition; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The physical file needs to move within the Microsoft.Toolkit.Uwp.UI assembly as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, I'll move it there! Any suggestion on where to place it? None of the existing folders seems relevant, is it ok if I create one called DropShadowPanel (following the same pattern as AdvancedCollectionView)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just putting in the Helpers folder for now would be alright. It'll be in the root namespace still, so folder structure doesn't really matter, we can always move it later if we want without breaking anyone. Thanks!
…adiogarcia/WindowsCommunityToolkit into user/arcadiog/dropShadowMask
|
This PR has been marked as "needs attention 👋" and awaiting a response from the team. |
Fixes
#3693
PR Type
What kind of change does this PR introduce?
Feature
What is the current behavior?
DropShadowPanel does not allow user controls to specify a custom alpha mask
What is the new behavior?
User controls can choose to implement IAlphaMaskProvider and their alpha mask will be picked up by the DropShadowPanel
PR Checklist
Please check if your PR fulfills the following requirements:
Other information