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/SearchBar.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/SearchBar.cs')
-rw-r--r-- | Xamarin.Forms.Core/SearchBar.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Xamarin.Forms.Core/SearchBar.cs b/Xamarin.Forms.Core/SearchBar.cs index a7d01b67..614671b1 100644 --- a/Xamarin.Forms.Core/SearchBar.cs +++ b/Xamarin.Forms.Core/SearchBar.cs @@ -5,7 +5,7 @@ using Xamarin.Forms.Platform; namespace Xamarin.Forms { [RenderWith(typeof(_SearchBarRenderer))] - public class SearchBar : View, IFontElement, ISearchBarController, IElementConfiguration<SearchBar> + public class SearchBar : View, IFontElement, ITextElement, ISearchBarController, IElementConfiguration<SearchBar> { public static readonly BindableProperty SearchCommandProperty = BindableProperty.Create("SearchCommand", typeof(ICommand), typeof(SearchBar), null, propertyChanged: OnCommandChanged); @@ -32,7 +32,7 @@ namespace Xamarin.Forms public static readonly BindableProperty HorizontalTextAlignmentProperty = BindableProperty.Create("HorizontalTextAlignment", typeof(TextAlignment), typeof(SearchBar), TextAlignment.Start); - public static readonly BindableProperty TextColorProperty = BindableProperty.Create("TextColor", typeof(Color), typeof(SearchBar), Color.Default); + public static readonly BindableProperty TextColorProperty = TextElement.TextColorProperty; public static readonly BindableProperty PlaceholderColorProperty = BindableProperty.Create("PlaceholderColor", typeof(Color), typeof(SearchBar), Color.Default); @@ -82,8 +82,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); } } bool IsEnabledCore @@ -182,5 +182,9 @@ namespace Xamarin.Forms { return _platformConfigurationRegistry.Value.On<T>(); } + + void ITextElement.OnTextColorPropertyChanged(Color oldValue, Color newValue) + { + } } }
\ No newline at end of file |