diff --git a/src/Perspex.Controls/TextBlock.cs b/src/Perspex.Controls/TextBlock.cs index a1df8c77ed..61dfc7e263 100644 --- a/src/Perspex.Controls/TextBlock.cs +++ b/src/Perspex.Controls/TextBlock.cs @@ -250,6 +250,16 @@ namespace Perspex.Controls return control.GetValue(FontWeightProperty); } + /// + /// Gets the value of the attached on a control. + /// + /// The control. + /// The foreground. + public static Brush GetForeground(Control control) + { + return control.GetValue(ForegroundProperty); + } + /// /// Sets the value of the attached on a control. /// @@ -294,6 +304,17 @@ namespace Perspex.Controls control.SetValue(FontWeightProperty, value); } + /// + /// Sets the value of the attached on a control. + /// + /// The control. + /// The property value to set. + /// The font family. + public static void SetForeground(Control control, Brush value) + { + control.SetValue(ForegroundProperty, value); + } + /// /// Renders the to a drawing context. ///