diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2017-03-06 10:35:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-06 10:35:17 +0100 |
commit | 8bc7ba3faade6e7396347f20dd8968fd35491671 (patch) | |
tree | b7427708c6771d38fb7bcc0b099eb492f4b4b93c /Xamarin.Forms.Core/DatePicker.cs | |
parent | bc53ebe2bfb1bfc1b3e4c8f098691670337b3412 (diff) | |
download | xamarin-forms-8bc7ba3faade6e7396347f20dd8968fd35491671.tar.gz xamarin-forms-8bc7ba3faade6e7396347f20dd8968fd35491671.tar.bz2 xamarin-forms-8bc7ba3faade6e7396347f20dd8968fd35491671.zip |
[C] ITextElement and TextElement (#789)
Diffstat (limited to 'Xamarin.Forms.Core/DatePicker.cs')
-rw-r--r-- | Xamarin.Forms.Core/DatePicker.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Xamarin.Forms.Core/DatePicker.cs b/Xamarin.Forms.Core/DatePicker.cs index 9ef7a7eb..ed16a870 100644 --- a/Xamarin.Forms.Core/DatePicker.cs +++ b/Xamarin.Forms.Core/DatePicker.cs @@ -4,7 +4,7 @@ using Xamarin.Forms.Platform; namespace Xamarin.Forms { [RenderWith(typeof(_DatePickerRenderer))] - public class DatePicker : View, IElementConfiguration<DatePicker> + public class DatePicker : View, ITextElement,IElementConfiguration<DatePicker> { public static readonly BindableProperty FormatProperty = BindableProperty.Create(nameof(Format), typeof(string), typeof(DatePicker), "d"); @@ -17,7 +17,7 @@ namespace Xamarin.Forms public static readonly BindableProperty MaximumDateProperty = BindableProperty.Create(nameof(MaximumDate), typeof(DateTime), typeof(DatePicker), new DateTime(2100, 12, 31), validateValue: ValidateMaximumDate, coerceValue: CoerceMaximumDate); - public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(DatePicker), Color.Default); + public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty; readonly Lazy<PlatformConfigurationRegistry<DatePicker>> _platformConfigurationRegistry; @@ -52,8 +52,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 event EventHandler<DateChangedEventArgs> DateSelected; @@ -115,5 +115,9 @@ namespace Xamarin.Forms { return _platformConfigurationRegistry.Value.On<T>(); } + + void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue) + { + } } }
\ No newline at end of file |