From 03b3f671970ac9f4d2e4045773dbece7c1a78572 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Sun, 20 Oct 2024 01:18:59 +0100 Subject: [PATCH] update how transform elements are stored --- .../Bootstrapper/CustomDialog.Creator.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 4dd8650d..9f3201ee 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -335,16 +335,18 @@ private static void HandleXmlTransformation(TransformGroup group, XElement xmlEl private static void ApplyTransformations_UIElement(UIElement uiElement, XElement xmlElement) { - if (!xmlElement.HasElements) - return; + var renderTransform = xmlElement.Element("RenderTransform"); - var tg = new TransformGroup(); + if (renderTransform != null) + { + var tg = new TransformGroup(); - foreach (var child in xmlElement.Elements()) - HandleXmlTransformation(tg, child); + foreach (var child in renderTransform.Elements()) + HandleXmlTransformation(tg, child); - if (tg.Children.Any()) - uiElement.RenderTransform = tg; + if (tg.Children.Any()) + uiElement.RenderTransform = tg; + } } #endregion