Exemple #1
0
 public void CreateGifAnimation(MemoryStream memoryStream)
 {
     DeletePreviousImage();
     gifAnimation = null;
     gifAnimation = new GifAnimation();
     gifAnimation.CreateGifAnimation(memoryStream);
     gifAnimation.Stretch          = Stretch;
     gifAnimation.StretchDirection = StretchDirection;
     this.AddChild(gifAnimation);
 }
Exemple #2
0
        private void GifImage_Unloaded(object sender, RoutedEventArgs e)
        {
            if (gifAnimation != null)
            {
                gifAnimation.Dispose();
            }

            image        = null;
            gifAnimation = null;
        }
Exemple #3
0
 private void DeletePreviousImage()
 {
     if (image != null)
     {
         this.RemoveLogicalChild(image);
         image = null;
     }
     if (gifAnimation != null)
     {
         this.RemoveLogicalChild(gifAnimation);
         gifAnimation = null;
     }
     this.Content = null;
 }