add stretch & stretchdirection to images

This commit is contained in:
bluepilledgreat 2024-10-19 21:34:51 +01:00
parent f74ca0552f
commit 23d8bb1aaa

View File

@ -501,6 +501,9 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
var image = new Image(); var image = new Image();
HandleXmlElement_FrameworkElement(dialog, image, xmlElement); HandleXmlElement_FrameworkElement(dialog, image, xmlElement);
image.Stretch = ParseXmlAttribute<Stretch>(xmlElement, "Stretch", Stretch.Uniform);
image.StretchDirection = ParseXmlAttribute<StretchDirection>(xmlElement, "StretchDirection", StretchDirection.Both);
string sourcePath = GetXmlAttribute(xmlElement, "Source"); string sourcePath = GetXmlAttribute(xmlElement, "Source");
sourcePath = sourcePath.Replace("theme://", $"{dialog.ThemeDir}\\"); sourcePath = sourcePath.Replace("theme://", $"{dialog.ThemeDir}\\");