mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add stackpanel
This commit is contained in:
parent
20aeb4a1ab
commit
bf64ec8af0
@ -133,6 +133,13 @@
|
||||
"ColumnDefinitions": "object"
|
||||
}
|
||||
},
|
||||
"StackPanel": {
|
||||
"SuperClass": "FrameworkElement",
|
||||
"IsCreatable": true,
|
||||
"Attributes": {
|
||||
"Orientation": "Orientation"
|
||||
}
|
||||
},
|
||||
"RowDefinition": {
|
||||
"IsCreatable": true,
|
||||
"Attributes": {
|
||||
@ -483,6 +490,12 @@
|
||||
"Performance",
|
||||
"Quality"
|
||||
]
|
||||
},
|
||||
"Orientation": {
|
||||
"Values": [
|
||||
"Horizontal",
|
||||
"Vertical"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -31,6 +31,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
["MarkdownTextBlock"] = HandleXmlElement_MarkdownTextBlock,
|
||||
["Image"] = HandleXmlElement_Image,
|
||||
["Grid"] = HandleXmlElement_Grid,
|
||||
["StackPanel"] = HandleXmlElement_StackPanel,
|
||||
|
||||
["SolidColorBrush"] = HandleXmlElement_SolidColorBrush,
|
||||
["ImageBrush"] = HandleXmlElement_ImageBrush,
|
||||
|
@ -713,6 +713,22 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
return grid;
|
||||
}
|
||||
|
||||
private static StackPanel HandleXmlElement_StackPanel(CustomDialog dialog, XElement xmlElement)
|
||||
{
|
||||
var stackPanel = new StackPanel();
|
||||
HandleXmlElement_FrameworkElement(dialog, stackPanel, xmlElement);
|
||||
|
||||
stackPanel.Orientation = ParseXmlAttribute<Orientation>(xmlElement, "Orientation", Orientation.Vertical);
|
||||
|
||||
foreach (var element in xmlElement.Elements())
|
||||
{
|
||||
var uiElement = HandleXml<FrameworkElement>(dialog, element);
|
||||
stackPanel.Children.Add(uiElement);
|
||||
}
|
||||
|
||||
return stackPanel;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user