private void CreateGifAnimation(MemoryStream memoryStream) { _gifAnimation = new GifAnimation(); _gifAnimation.CreateGifAnimation(memoryStream); _gifAnimation.Stretch = Stretch; _gifAnimation.StretchDirection = StretchDirection; this.AddChild(_gifAnimation); }
private void DeletePreviousImage() { if (_image != null) { this.RemoveLogicalChild(_image); this.Content = null; _image = null; } if (_gifAnimation != null) { this.RemoveLogicalChild(_gifAnimation); this.Content = null; _gifAnimation = null; } }
public void NextFrame(object sender, EventArgs args) { GifAnimation b = (GifAnimation)this.Target; if (b != null) { b.NextFrame(sender, args); } else { DispatcherTimer c = sender as DispatcherTimer; if (c != null) { c.Tick -= new EventHandler(this.NextFrame); } } }
public WeakContainer(GifAnimation target) : base(target) { }