Beispiel #1
0
 private void CreateGifAnimation(MemoryStream memoryStream)
 {
     gifAnimation = new GifAnimation();
     gifAnimation.CreateGifAnimation(memoryStream);
     gifAnimation.Stretch          = Stretch;
     gifAnimation.StretchDirection = StretchDirection;
     this.Content = gifAnimation;
     //this.AddChild(gifAnimation);
 }
Beispiel #2
0
 void GifImage_Unloaded(object sender, RoutedEventArgs e)
 {
     if (image != null)
     {
         this.RemoveLogicalChild(image);
         image = null;
     }
     if (gifAnimation != null)
     {
         this.RemoveLogicalChild(gifAnimation);
         if (this.gifAnimation.FrameTimer != null)
         {
             this.gifAnimation.FrameTimer.Tick -= this.gifAnimation.NextFrame;
             this.gifAnimation.FrameTimer       = null;
         }
         gifAnimation = null;
     }
 }
Beispiel #3
0
 public void DeletePreviousImage()
 {
     if (image != null)
     {
         this.RemoveLogicalChild(image);
         image = null;
     }
     if (gifAnimation != null)
     {
         this.RemoveLogicalChild(gifAnimation);
         if (this.gifAnimation.FrameTimer != null)
         {
             //this.gifAnimation.FrameTimer.Tick -= this.gifAnimation.NextFrame;
             //this.gifAnimation.FrameTimer = null;
         }
         gifAnimation = null;
     }
 }