We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7ba0fa commit 59cd9feCopy full SHA for 59cd9fe
Microsoft.Toolkit.Uwp.UI/Shadows/AttachedDropShadow.cs
@@ -290,7 +290,11 @@ protected override CompositionBrush GetShadowMask(AttachedShadowElementContext c
290
// Create a ShapeVisual so that our geometry can be rendered to a visual
291
var shapeVisual = context.GetResource(ShapeVisualResourceKey) ??
292
context.AddResource(ShapeVisualResourceKey, context.Compositor.CreateShapeVisual());
293
- shapeVisual.Shapes.Add(shape);
+
294
+ if (!shapeVisual.Shapes.Contains(shape))
295
+ {
296
+ shapeVisual.Shapes.Add(shape);
297
+ }
298
299
// Create a CompositionVisualSurface, which renders our ShapeVisual to a texture
300
var visualSurface = context.GetResource(VisualSurfaceResourceKey) ??
0 commit comments