add font properties to control

This commit is contained in:
bluepilledgreat 2024-10-22 19:44:26 +01:00
parent eec3f3251a
commit 97ff46d3f3
2 changed files with 10 additions and 1 deletions

View File

@ -27,7 +27,10 @@
"BorderThickness": "Thickness",
"Foreground": "Brush",
"Background": "Brush",
"BorderBrush": "Brush"
"BorderBrush": "Brush",
"FontSize": "double",
"FontWeight": "FontWeight",
"FontStyle": "FontStyle"
}
},
"BloxstrapCustomBootstrapper": {

View File

@ -610,6 +610,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
ApplyBrush_UIElement(dialog, uiElement, "Background", Control.BackgroundProperty, xmlElement);
ApplyBrush_UIElement(dialog, uiElement, "BorderBrush", Control.BorderBrushProperty, xmlElement);
var fontSize = ParseXmlAttributeNullable<double>(xmlElement, "FontSize");
if (fontSize is double)
uiElement.FontSize = (double)fontSize;
uiElement.FontWeight = GetFontWeightFromXElement(xmlElement);
uiElement.FontStyle = GetFontStyleFromXElement(xmlElement);
}
private static UIElement HandleXmlElement_BloxstrapCustomBootstrapper(CustomDialog dialog, XElement xmlElement)