diff --git a/Bloxstrap/Resources/CustomBootstrapperSchema.json b/Bloxstrap/Resources/CustomBootstrapperSchema.json index b790d7c..79e405b 100644 --- a/Bloxstrap/Resources/CustomBootstrapperSchema.json +++ b/Bloxstrap/Resources/CustomBootstrapperSchema.json @@ -12,7 +12,10 @@ "HorizontalAlignment": "HorizontalAlignment", "VerticalAlignment": "VerticalAlignment", "ZIndex": "int", - "RenderTransform": "Transform" + "RenderTransform": "Transform", + "Opacity": "double", + "OpacityMask": "Brush", + "RenderTransformOrigin": "Point" } }, "Control": { diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 9ad197f..0717c7a 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -573,6 +573,13 @@ namespace Bloxstrap.UI.Elements.Bootstrapper uiElement.HorizontalAlignment = ParseXmlAttribute(xmlElement, "HorizontalAlignment", HorizontalAlignment.Left); uiElement.VerticalAlignment = ParseXmlAttribute(xmlElement, "VerticalAlignment", VerticalAlignment.Top); + uiElement.Opacity = ParseXmlAttribute(xmlElement, "Opacity", 1); + ApplyBrush_UIElement(dialog, uiElement, "OpacityMask", FrameworkElement.OpacityMaskProperty, xmlElement); + + object? renderTransformOrigin = GetPointFromXElement(xmlElement, "RenderTransformOrigin"); + if (renderTransformOrigin is Point) + uiElement.RenderTransformOrigin = (Point)renderTransformOrigin; + int zIndex = ParseXmlAttributeClamped(xmlElement, "ZIndex", defaultValue: 0, min: 0, max: 1000); Panel.SetZIndex(uiElement, zIndex); @@ -605,6 +612,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper xmlElement.SetAttributeValue("IsEnabled", "True"); HandleXmlElement_Control(dialog, dialog, xmlElement); + dialog.Opacity = 1; + // transfer effect to element grid dialog.ElementGrid.RenderTransform = dialog.RenderTransform; dialog.RenderTransform = null;