-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Clip inner content from AttachedCardShadow using CompositionMaskBrush #4404
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
Merged
michael-hawker
merged 14 commits into
CommunityToolkit:main
from
Ryken100:ryken100/feature-AttachedNineGridCardShadow
May 11, 2022
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5704ce1
Additional null checks
chris-blackman fded2ed
Add InnerContentClipMode
chris-blackman 136436f
Remove unused code. Add InnerContentClipMode.None.
chris-blackman aa9a7ae
Fix NullReferenceException
chris-blackman 7c1da95
Add InnerContentClipMode to sample
chris-blackman 095c315
Set CompositionGeometricClip as the default clipping mode
chris-blackman d90b89a
Don't inherit from AttachedCardShadowBase
chris-blackman 2c870ee
Rearrange elements
chris-blackman 169e296
Add comment.
chris-blackman 0809907
Add header
chris-blackman d2c13d0
Update AttachedCardShadow.cs
chris-blackman b6cf5c1
Update AttachedCardShadow.cs
chris-blackman 555d6e9
Add comments to AttachedCardShadow
chris-blackman 65e350b
Use "is not null" instead of "!= null" in AttachedShadowElementContext
chris-blackman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Microsoft.Toolkit.Uwp.UI.Media/Enums/InnerContentClipMode.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.UI.Media | ||
| { | ||
| /// <summary> | ||
| /// The method that each instance of <see cref="AttachedCardShadow"/> uses when clipping its inner content. | ||
| /// </summary> | ||
| public enum InnerContentClipMode | ||
| { | ||
| /// <summary> | ||
| /// Do not clip inner content. | ||
| /// </summary> | ||
| None, | ||
|
|
||
| /// <summary> | ||
| /// Use <see cref="Windows.UI.Composition.CompositionMaskBrush"/> to clip inner content. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This mode has better performance than <see cref="CompositionGeometricClip"/>. | ||
| /// </remarks> | ||
| CompositionMaskBrush, | ||
|
|
||
| /// <summary> | ||
| /// Use <see cref="Windows.UI.Composition.CompositionGeometricClip"/> to clip inner content. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Content clipped in this mode will have smoother corners than when using <see cref="CompositionMaskBrush"/>. | ||
| /// </remarks> | ||
| CompositionGeometricClip | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.