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
293293 else
294294 {
295295 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+
296302 context . RemoveAndDisposeResource ( OpacityMaskVisualSurfaceResourceKey ) ;
297303 context . RemoveAndDisposeResource ( OpacityMaskSurfaceBrushResourceKey ) ;
298304 context . RemoveAndDisposeResource ( OpacityMaskVisualResourceKey ) ;
@@ -321,6 +327,7 @@ protected internal override void OnSizeChanged(AttachedShadowElementContext cont
321327 }
322328
323329 UpdateShadowClip ( context ) ;
330+ UpdateVisualOpacityMask ( context ) ;
324331
325332 base . OnSizeChanged ( context , newSize , previousSize ) ;
326333 }
You can’t perform that action at this time.
0 commit comments