Currently, RadPictureBox supports the gif format, but the animated gifs are not animated like the standard MS PictureBox.
Workaround: use a RadLabel to show the animated gif:
this.radLabel1.LabelElement.Image = Properties.Resources.giphy;
Hello,
I would like to follow up with an alternative solution:
public class CustomPictureBox : RadPictureBox
{
protected override RadPictureBoxElement CreateImageEditorElement()
{
return new CustomRadPictureBoxElement();
}
}
public class CustomRadPictureBoxElement : RadPictureBoxElement
{
public override Image Image { get => GetPaintImage(); set => base.Image = value; }
private Image GetPaintImage()
{
Image image = base.Image;
if (image == null)
{
return null;
}
Image paintImage = image;
lock (image)
{
this.AnimateImage(image, false);
ImageAnimator.UpdateFrames();
paintImage = image;
return paintImage;
}
}
private void OnFrameChanged(object o, EventArgs e)
{
this.Invalidate();
}
}
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.