mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add more frameworkelement properties
This commit is contained in:
parent
f1997a34d3
commit
6a07c9c8bd
@ -12,7 +12,10 @@
|
|||||||
"HorizontalAlignment": "HorizontalAlignment",
|
"HorizontalAlignment": "HorizontalAlignment",
|
||||||
"VerticalAlignment": "VerticalAlignment",
|
"VerticalAlignment": "VerticalAlignment",
|
||||||
"ZIndex": "int",
|
"ZIndex": "int",
|
||||||
"RenderTransform": "Transform"
|
"RenderTransform": "Transform",
|
||||||
|
"Opacity": "double",
|
||||||
|
"OpacityMask": "Brush",
|
||||||
|
"RenderTransformOrigin": "Point"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Control": {
|
"Control": {
|
||||||
|
@ -573,6 +573,13 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
uiElement.HorizontalAlignment = ParseXmlAttribute<HorizontalAlignment>(xmlElement, "HorizontalAlignment", HorizontalAlignment.Left);
|
uiElement.HorizontalAlignment = ParseXmlAttribute<HorizontalAlignment>(xmlElement, "HorizontalAlignment", HorizontalAlignment.Left);
|
||||||
uiElement.VerticalAlignment = ParseXmlAttribute<VerticalAlignment>(xmlElement, "VerticalAlignment", VerticalAlignment.Top);
|
uiElement.VerticalAlignment = ParseXmlAttribute<VerticalAlignment>(xmlElement, "VerticalAlignment", VerticalAlignment.Top);
|
||||||
|
|
||||||
|
uiElement.Opacity = ParseXmlAttribute<double>(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);
|
int zIndex = ParseXmlAttributeClamped(xmlElement, "ZIndex", defaultValue: 0, min: 0, max: 1000);
|
||||||
Panel.SetZIndex(uiElement, zIndex);
|
Panel.SetZIndex(uiElement, zIndex);
|
||||||
|
|
||||||
@ -605,6 +612,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
xmlElement.SetAttributeValue("IsEnabled", "True");
|
xmlElement.SetAttributeValue("IsEnabled", "True");
|
||||||
HandleXmlElement_Control(dialog, dialog, xmlElement);
|
HandleXmlElement_Control(dialog, dialog, xmlElement);
|
||||||
|
|
||||||
|
dialog.Opacity = 1;
|
||||||
|
|
||||||
// transfer effect to element grid
|
// transfer effect to element grid
|
||||||
dialog.ElementGrid.RenderTransform = dialog.RenderTransform;
|
dialog.ElementGrid.RenderTransform = dialog.RenderTransform;
|
||||||
dialog.RenderTransform = null;
|
dialog.RenderTransform = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user