mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add foreground property to control
This commit is contained in:
parent
da5144801f
commit
9cd4d46e37
@ -412,11 +412,17 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
if (borderThickness != null)
|
||||
uiElement.BorderThickness = (Thickness)borderThickness;
|
||||
|
||||
object? foregroundBrush = GetBrushFromXElement(xmlElement, "Background");
|
||||
object? foregroundBrush = GetBrushFromXElement(xmlElement, "Foreground");
|
||||
if (foregroundBrush is Brush)
|
||||
uiElement.Background = (Brush)foregroundBrush;
|
||||
uiElement.Foreground = (Brush)foregroundBrush;
|
||||
else if (foregroundBrush is string)
|
||||
uiElement.SetResourceReference(Control.BackgroundProperty, foregroundBrush);
|
||||
uiElement.SetResourceReference(Control.ForegroundProperty, foregroundBrush);
|
||||
|
||||
object? backgroundBrush = GetBrushFromXElement(xmlElement, "Background");
|
||||
if (backgroundBrush is Brush)
|
||||
uiElement.Background = (Brush)backgroundBrush;
|
||||
else if (backgroundBrush is string)
|
||||
uiElement.SetResourceReference(Control.BackgroundProperty, backgroundBrush);
|
||||
|
||||
object? borderBrush = GetBrushFromXElement(xmlElement, "BorderBrush");
|
||||
if (borderBrush is Brush)
|
||||
|
Loading…
Reference in New Issue
Block a user