Skip to content

Commit

Permalink
Fix resize issue when AttachedCardShadow.InnerContentClipMode == Comp…
Browse files Browse the repository at this point in the history
…ositionMaskBrush
  • Loading branch information
chris-blackman committed Jun 28, 2022
1 parent afe134d commit 891fa5c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Microsoft.Toolkit.Uwp.UI.Media/Shadows/AttachedCardShadow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@ protected internal override void OnSizeChanged(AttachedShadowElementContext cont
shapeVisual.Size = sizeAsVec2;
}

if (context.TryGetResource(OpacityMaskVisualSurfaceResourceKey, out CompositionVisualSurface opacityMaskVisualSurface))
{
opacityMaskVisualSurface.SourceSize = sizeAsVec2 + new Vector2(MaxBlurRadius * 2);
}

if (InnerContentClipMode is InnerContentClipMode.CompositionMaskBrush)
{
context.SpriteVisual.Size = sizeAsVec2;
}

UpdateShadowClip(context);
UpdateVisualOpacityMask(context);

Expand Down

0 comments on commit 891fa5c

Please sign in to comment.