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 9bc3ac4 commit aa6009aCopy full SHA for aa6009a
components/Shimmer/src/Shimmer/Shimmer.cs
@@ -86,9 +86,11 @@ private void OnUnloaded(object sender, RoutedEventArgs e)
86
ActualThemeChanged -= OnActualThemeChanged;
87
StopAnimation();
88
89
- if (_initialized)
+ if (_initialized && _shape != null)
90
{
91
+#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
92
ElementCompositionPreview.SetElementChildVisual(_shape, null);
93
+#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.
94
_disposableVisualResources?.Dispose();
95
_initialized = false;
96
}
0 commit comments