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 894a3d7 commit f6ec0f2Copy full SHA for f6ec0f2
Microsoft.Toolkit.Uwp.UI.Controls/DropShadowPanel/DropShadowPanel.cs
@@ -50,8 +50,6 @@ public DropShadowPanel()
50
51
_dropShadow = compositor.CreateDropShadow();
52
_shadowVisual.Shadow = _dropShadow;
53
-
54
- SizeChanged += OnSizeChanged;
55
}
56
57
@@ -72,6 +70,13 @@ protected override void OnApplyTemplate()
72
70
ElementCompositionPreview.SetElementChildVisual(_border, _shadowVisual);
73
71
74
+ var content = this.Content as FrameworkElement;
+
75
+ if (content != null)
76
+ {
77
+ content.SizeChanged += OnSizeChanged;
78
+ }
79
80
ConfigureShadowVisualForCastingElement();
81
82
base.OnApplyTemplate();
0 commit comments