Skip to content

Commit

Permalink
update how transform elements are stored
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Oct 20, 2024
1 parent e1aa35e commit 03b3f67
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 03b3f67

Please sign in to comment.