diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index 3e54892..d92799b 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -61,6 +61,7 @@ + diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index b6ccbad..9031584 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -530,7 +530,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper throw new Exception($"Image Failed to create BitmapImage: {ex.Message}", ex); } - image.Source = bitmapImage; + bool isAnimated = ParseXmlAttribute(xmlElement, "IsAnimated", false); + if (!isAnimated) + image.Source = bitmapImage; + else // we create the bitmapimage to check if the gif is valid + XamlAnimatedGif.AnimationBehavior.SetSourceUri(image, result); } ApplyTransformations_UIElement(image, xmlElement);