Browse Source

Added missing attached property accessors.

For TextBlock.Foreground.
pull/297/head
Steven Kirk 11 years ago
parent
commit
9d2eb399f5
  1. 21
      src/Perspex.Controls/TextBlock.cs

21
src/Perspex.Controls/TextBlock.cs

@ -250,6 +250,16 @@ namespace Perspex.Controls
return control.GetValue(FontWeightProperty);
}
/// <summary>
/// Gets the value of the attached <see cref="ForegroundProperty"/> on a control.
/// </summary>
/// <param name="control">The control.</param>
/// <returns>The foreground.</returns>
public static Brush GetForeground(Control control)
{
return control.GetValue(ForegroundProperty);
}
/// <summary>
/// Sets the value of the attached <see cref="FontFamilyProperty"/> on a control.
/// </summary>
@ -294,6 +304,17 @@ namespace Perspex.Controls
control.SetValue(FontWeightProperty, value);
}
/// <summary>
/// Sets the value of the attached <see cref="ForegroundProperty"/> on a control.
/// </summary>
/// <param name="control">The control.</param>
/// <param name="value">The property value to set.</param>
/// <returns>The font family.</returns>
public static void SetForeground(Control control, Brush value)
{
control.SetValue(ForegroundProperty, value);
}
/// <summary>
/// Renders the <see cref="TextBlock"/> to a drawing context.
/// </summary>

Loading…
Cancel
Save