mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add gif support
This commit is contained in:
parent
94b42c1cb8
commit
f74ca0552f
@ -61,6 +61,7 @@
|
|||||||
<PackageReference Include="securifybv.ShellLink" Version="0.1.0" />
|
<PackageReference Include="securifybv.ShellLink" Version="0.1.0" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="System.Resources.ResourceManager" Version="4.3.0" />
|
<PackageReference Include="System.Resources.ResourceManager" Version="4.3.0" />
|
||||||
|
<PackageReference Include="XamlAnimatedGif" Version="2.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -530,7 +530,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
throw new Exception($"Image Failed to create BitmapImage: {ex.Message}", ex);
|
throw new Exception($"Image Failed to create BitmapImage: {ex.Message}", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isAnimated = ParseXmlAttribute<bool>(xmlElement, "IsAnimated", false);
|
||||||
|
if (!isAnimated)
|
||||||
image.Source = bitmapImage;
|
image.Source = bitmapImage;
|
||||||
|
else // we create the bitmapimage to check if the gif is valid
|
||||||
|
XamlAnimatedGif.AnimationBehavior.SetSourceUri(image, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyTransformations_UIElement(image, xmlElement);
|
ApplyTransformations_UIElement(image, xmlElement);
|
||||||
|
Loading…
Reference in New Issue
Block a user