diff options
Diffstat (limited to 'Xamarin.Forms.Core/Label.cs')
-rw-r--r-- | Xamarin.Forms.Core/Label.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Xamarin.Forms.Core/Label.cs b/Xamarin.Forms.Core/Label.cs index 052289b6..b9794118 100644 --- a/Xamarin.Forms.Core/Label.cs +++ b/Xamarin.Forms.Core/Label.cs @@ -7,7 +7,7 @@ namespace Xamarin.Forms { [ContentProperty("Text")] [RenderWith(typeof(_LabelRenderer))] - public class Label : View, IFontElement, IElementConfiguration<Label> + public class Label : View, IFontElement, ITextElement, IElementConfiguration<Label> { public static readonly BindableProperty HorizontalTextAlignmentProperty = BindableProperty.Create("HorizontalTextAlignment", typeof(TextAlignment), typeof(Label), TextAlignment.Start, propertyChanged: OnHorizontalTextAlignmentPropertyChanged); @@ -21,7 +21,7 @@ namespace Xamarin.Forms [Obsolete("YAlignProperty is obsolete. Please use VerticalTextAlignmentProperty instead.")] public static readonly BindableProperty YAlignProperty = VerticalTextAlignmentProperty; - public static readonly BindableProperty TextColorProperty = BindableProperty.Create("TextColor", typeof(Color), typeof(Label), Color.Default); + public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty; public static readonly BindableProperty FontProperty = FontElement.FontProperty; @@ -90,8 +90,8 @@ namespace Xamarin.Forms public Color TextColor { - get { return (Color)GetValue(TextColorProperty); } - set { SetValue(TextColorProperty, value); } + get { return (Color)GetValue(TextElement.TextColorProperty); } + set { SetValue(TextElement.TextColorProperty, value); } } public TextAlignment VerticalTextAlignment @@ -186,5 +186,9 @@ namespace Xamarin.Forms { return _platformConfigurationRegistry.Value.On<T>(); } + + void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue) + { + } } }
\ No newline at end of file |