mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add background property to textblock
This commit is contained in:
parent
9cd4d46e37
commit
61f8235a74
@ -555,6 +555,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
else if (foregroundBrush is string)
|
else if (foregroundBrush is string)
|
||||||
textBlock.SetResourceReference(TextBlock.ForegroundProperty, foregroundBrush);
|
textBlock.SetResourceReference(TextBlock.ForegroundProperty, foregroundBrush);
|
||||||
|
|
||||||
|
object? backgroundBrush = GetBrushFromXElement(xmlElement, "Background");
|
||||||
|
if (backgroundBrush is Brush)
|
||||||
|
textBlock.Foreground = (Brush)backgroundBrush;
|
||||||
|
else if (backgroundBrush is string)
|
||||||
|
textBlock.SetResourceReference(TextBlock.BackgroundProperty, backgroundBrush);
|
||||||
|
|
||||||
var fontSize = ParseXmlAttributeNullable<double>(xmlElement, "FontSize");
|
var fontSize = ParseXmlAttributeNullable<double>(xmlElement, "FontSize");
|
||||||
if (fontSize is double)
|
if (fontSize is double)
|
||||||
textBlock.FontSize = (double)fontSize;
|
textBlock.FontSize = (double)fontSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user