private void CreateGifAnimation(MemoryStream memoryStream) { gifAnimation = new GifAnimation(); gifAnimation.CreateGifAnimation(memoryStream); gifAnimation.Stretch = Stretch; gifAnimation.StretchDirection = StretchDirection; this.AddChild(gifAnimation); }