|
|
|
@ -7,6 +7,11 @@ |
|
|
|
public static readonly PerspexProperty<Brush> BackgroundProperty = |
|
|
|
Border.BackgroundProperty.AddOwner<TextBlock>(); |
|
|
|
|
|
|
|
public static readonly PerspexProperty<double> FontSizeProperty = |
|
|
|
PerspexProperty.Register<TextBlock, double>( |
|
|
|
"FontSize", |
|
|
|
inherits: true); |
|
|
|
|
|
|
|
public static readonly PerspexProperty<Brush> ForegroundProperty = |
|
|
|
PerspexProperty.Register<TextBlock, Brush>( |
|
|
|
"Foreground", |
|
|
|
@ -22,6 +27,12 @@ |
|
|
|
set { this.SetValue(BackgroundProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public double FontSize |
|
|
|
{ |
|
|
|
get { return this.GetValue(FontSizeProperty); } |
|
|
|
set { this.SetValue(FontSizeProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
public Brush Foreground |
|
|
|
{ |
|
|
|
get { return this.GetValue(ForegroundProperty); } |
|
|
|
@ -41,7 +52,7 @@ |
|
|
|
return new FormattedText |
|
|
|
{ |
|
|
|
FontFamilyName = "Segoe UI", |
|
|
|
FontSize = 18, |
|
|
|
FontSize = this.FontSize, |
|
|
|
Text = this.Text, |
|
|
|
}; |
|
|
|
} |
|
|
|
|