diff --git a/src/Perspex.Controls/TextBlock.cs b/src/Perspex.Controls/TextBlock.cs index b6bec05240..a1df8c77ed 100644 --- a/src/Perspex.Controls/TextBlock.cs +++ b/src/Perspex.Controls/TextBlock.cs @@ -210,6 +210,90 @@ namespace Perspex.Controls set { SetValue(TextAlignmentProperty, value); } } + /// + /// Gets the value of the attached on a control. + /// + /// The control. + /// The font family. + public static string GetFontFamily(Control control) + { + return control.GetValue(FontFamilyProperty); + } + + /// + /// Gets the value of the attached on a control. + /// + /// The control. + /// The font family. + public static double GetFontSize(Control control) + { + return control.GetValue(FontSizeProperty); + } + + /// + /// Gets the value of the attached on a control. + /// + /// The control. + /// The font family. + public static FontStyle GetFontStyle(Control control) + { + return control.GetValue(FontStyleProperty); + } + + /// + /// Gets the value of the attached on a control. + /// + /// The control. + /// The font family. + public static FontWeight GetFontWeight(Control control) + { + return control.GetValue(FontWeightProperty); + } + + /// + /// Sets the value of the attached on a control. + /// + /// The control. + /// The property value to set. + /// The font family. + public static void SetFontFamily(Control control, string value) + { + control.SetValue(FontFamilyProperty, value); + } + + /// + /// Sets the value of the attached on a control. + /// + /// The control. + /// The property value to set. + /// The font family. + public static void SetFontSize(Control control, double value) + { + control.SetValue(FontSizeProperty, value); + } + + /// + /// Sets the value of the attached on a control. + /// + /// The control. + /// The property value to set. + /// The font family. + public static void SetFontStyle(Control control, FontStyle value) + { + control.SetValue(FontStyleProperty, value); + } + + /// + /// Sets the value of the attached on a control. + /// + /// The control. + /// The property value to set. + /// The font family. + public static void SetFontWeight(Control control, FontWeight value) + { + control.SetValue(FontWeightProperty, value); + } + /// /// Renders the to a drawing context. ///