private void CreateGifAnimation(MemoryStream memoryStream) { gifAnimation = new GifAnimation(); gifAnimation.CreateGifAnimation(memoryStream); gifAnimation.Stretch = Stretch; gifAnimation.StretchDirection = StretchDirection; AddChild(gifAnimation); }
private void DeletePreviousImage() { if (image != null) { RemoveLogicalChild(image); image = null; } if (gifAnimation != null) { RemoveLogicalChild(gifAnimation); gifAnimation = null; } }