protected virtual void OnImageChanged(EventArgs e)
{
EventHandler handler;
DefineViewSize();
IsAnimating = false;
if (Image != null)
{
//try
//{
// this.IsAnimating = ImageAnimator.CanAnimate(this.Image);
// if (this.IsAnimating)
// {
// ImageAnimator.Animate(this.Image, this.OnFrameChangedHandler);
// }
//}
//catch (ArgumentException)
//{
// // probably a disposed image, ignore
//}
StartAnimating();
}
AdjustLayout();
handler = ImageChanged;
if (handler != null)
{
handler(this, e);
}
}