File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Microsoft.Toolkit.Uwp.UI.Media/Shadows Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,12 @@ protected override void SetElementChildVisual(AttachedShadowElementContext conte
293
293
else
294
294
{
295
295
base . SetElementChildVisual ( context ) ;
296
+
297
+ // Reset context.SpriteVisual.Size and RelativeSizeAdjustment to default values
298
+ // as they may be changed in the block above.
299
+ context . SpriteVisual . Size = Vector2 . Zero ;
300
+ context . SpriteVisual . RelativeSizeAdjustment = Vector2 . One ;
301
+
296
302
context . RemoveAndDisposeResource ( OpacityMaskVisualSurfaceResourceKey ) ;
297
303
context . RemoveAndDisposeResource ( OpacityMaskSurfaceBrushResourceKey ) ;
298
304
context . RemoveAndDisposeResource ( OpacityMaskVisualResourceKey ) ;
@@ -321,6 +327,7 @@ protected internal override void OnSizeChanged(AttachedShadowElementContext cont
321
327
}
322
328
323
329
UpdateShadowClip ( context ) ;
330
+ UpdateVisualOpacityMask ( context ) ;
324
331
325
332
base . OnSizeChanged ( context , newSize , previousSize ) ;
326
333
}
You can’t perform that action at this time.
0 commit comments