Browse Source

Added FontWeight to TemplatedControl.

pull/429/head
Steven Kirk 11 years ago
parent
commit
b6c60cf334
  1. 15
      src/Perspex.Controls/Primitives/TemplatedControl.cs

15
src/Perspex.Controls/Primitives/TemplatedControl.cs

@ -56,6 +56,12 @@ namespace Perspex.Controls.Primitives
public static readonly StyledProperty<FontStyle> FontStyleProperty = public static readonly StyledProperty<FontStyle> FontStyleProperty =
TextBlock.FontStyleProperty.AddOwner<TemplatedControl>(); TextBlock.FontStyleProperty.AddOwner<TemplatedControl>();
/// <summary>
/// Defines the <see cref="FontWeight"/> property.
/// </summary>
public static readonly StyledProperty<FontWeight> FontWeightProperty =
TextBlock.FontWeightProperty.AddOwner<TemplatedControl>();
/// <summary> /// <summary>
/// Defines the <see cref="Foreground"/> property. /// Defines the <see cref="Foreground"/> property.
/// </summary> /// </summary>
@ -177,6 +183,15 @@ namespace Perspex.Controls.Primitives
set { SetValue(FontStyleProperty, value); } set { SetValue(FontStyleProperty, value); }
} }
/// <summary>
/// Gets or sets the font weight used to draw the control's text.
/// </summary>
public FontWeight FontWeihght
{
get { return GetValue(FontWeightProperty); }
set { SetValue(FontWeightProperty, value); }
}
/// <summary> /// <summary>
/// Gets or sets the brush used to draw the control's text and other foreground elements. /// Gets or sets the brush used to draw the control's text and other foreground elements.
/// </summary> /// </summary>

Loading…
Cancel
Save