Esempio n. 1
0
 /// <summary>
 /// 创建gif动画
 /// </summary>
 /// <param name="memoryStream">内存数据流</param>
 private void CreateGifAnimation(MemoryStream memoryStream)
 {
     this._gifAnimation = new GifAnimation();
     this._gifAnimation.CreateGifAnimation(memoryStream);
     this._gifAnimation.Stretch          = this.Stretch;
     this._gifAnimation.StretchDirection = this.StretchDirection;
     this.AddChild(this._gifAnimation);
 }
Esempio n. 2
0
 /// <summary>
 /// 删除之前的图片
 /// </summary>
 private void DeletePreviousImage()
 {
     if (this._image != null)
     {
         this.RemoveLogicalChild(this._image);
         this._image = null;
     }
     if (this._gifAnimation != null)
     {
         this.RemoveLogicalChild(this._gifAnimation);
         this._gifAnimation = null;
     }
 }