コード例 #1
0
ファイル: GifImage.cs プロジェクト: xungong91/GxProgram
 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
ファイル: GifImage.cs プロジェクト: xungong91/GxProgram
 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
ファイル: GifImage.cs プロジェクト: xungong91/GxProgram
 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;
     }
 }