예제 #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);
 }
예제 #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;
     }
 }
예제 #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;
     }
 }