Remove SpriteVisual previously set by ElementCompositionPreview.SetElementChildVisual

257 views Asked by At
_compositor = ElementCompositionPreview.GetElementVisual(this).Compositor;
_blurSprite = _compositor.CreateSpriteVisual();
ElementCompositionPreview.SetElementChildVisual(MainPage.Instance.ContentRoot, _blurSprite);

How do I remove _blurSprite that has been previsously set byt ElementCompositionPreview?

1

There are 1 answers

0
Decade Moon On
ElementCompositionPreview.SetElementChildVisual(MainPage.Instance.ContentRoot, null);