|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using Avalonia.Controls.Documents; |
|
|
|
using Avalonia.Controls.Templates; |
|
|
|
using Avalonia.Interactivity; |
|
|
|
using Avalonia.Logging; |
|
|
|
@ -37,6 +38,42 @@ namespace Avalonia.Controls.Primitives |
|
|
|
public static readonly StyledProperty<CornerRadius> CornerRadiusProperty = |
|
|
|
Border.CornerRadiusProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="FontFamily"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<FontFamily> FontFamilyProperty = |
|
|
|
TextElement.FontFamilyProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="FontSize"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<double> FontSizeProperty = |
|
|
|
TextElement.FontSizeProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="FontStyle"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<FontStyle> FontStyleProperty = |
|
|
|
TextElement.FontStyleProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="FontWeight"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<FontWeight> FontWeightProperty = |
|
|
|
TextElement.FontWeightProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="FontWeight"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<FontStretch> FontStretchProperty = |
|
|
|
TextElement.FontStretchProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Foreground"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<IBrush?> ForegroundProperty = |
|
|
|
TextElement.ForegroundProperty.AddOwner<TemplatedControl>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Padding"/> property.
|
|
|
|
/// </summary>
|
|
|
|
@ -119,6 +156,60 @@ namespace Avalonia.Controls.Primitives |
|
|
|
set { SetValue(CornerRadiusProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the font family used to draw the control's text.
|
|
|
|
/// </summary>
|
|
|
|
public FontFamily FontFamily |
|
|
|
{ |
|
|
|
get { return GetValue(FontFamilyProperty); } |
|
|
|
set { SetValue(FontFamilyProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the size of the control's text in points.
|
|
|
|
/// </summary>
|
|
|
|
public double FontSize |
|
|
|
{ |
|
|
|
get { return GetValue(FontSizeProperty); } |
|
|
|
set { SetValue(FontSizeProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the font style used to draw the control's text.
|
|
|
|
/// </summary>
|
|
|
|
public FontStyle FontStyle |
|
|
|
{ |
|
|
|
get { return GetValue(FontStyleProperty); } |
|
|
|
set { SetValue(FontStyleProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the font weight used to draw the control's text.
|
|
|
|
/// </summary>
|
|
|
|
public FontWeight FontWeight |
|
|
|
{ |
|
|
|
get { return GetValue(FontWeightProperty); } |
|
|
|
set { SetValue(FontWeightProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the font stretch used to draw the control's text.
|
|
|
|
/// </summary>
|
|
|
|
public FontStretch FontStretch |
|
|
|
{ |
|
|
|
get { return GetValue(FontStretchProperty); } |
|
|
|
set { SetValue(FontStretchProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the brush used to draw the control's text and other foreground elements.
|
|
|
|
/// </summary>
|
|
|
|
public IBrush? Foreground |
|
|
|
{ |
|
|
|
get { return GetValue(ForegroundProperty); } |
|
|
|
set { SetValue(ForegroundProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the padding placed between the border of the control and its content.
|
|
|
|
/// </summary>
|
|
|
|
|