diff options
Diffstat (limited to 'Xamarin.Forms.Core/SearchBar.cs')
-rw-r--r-- | Xamarin.Forms.Core/SearchBar.cs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Xamarin.Forms.Core/SearchBar.cs b/Xamarin.Forms.Core/SearchBar.cs index 6e2a6c63..5e82f84e 100644 --- a/Xamarin.Forms.Core/SearchBar.cs +++ b/Xamarin.Forms.Core/SearchBar.cs @@ -24,12 +24,11 @@ namespace Xamarin.Forms public static readonly BindableProperty PlaceholderProperty = BindableProperty.Create("Placeholder", typeof(string), typeof(SearchBar), null); - public static readonly BindableProperty FontFamilyProperty = BindableProperty.Create("FontFamily", typeof(string), typeof(SearchBar), default(string)); + public static readonly BindableProperty FontFamilyProperty = FontElement.FontFamilyProperty; - public static readonly BindableProperty FontSizeProperty = BindableProperty.Create("FontSize", typeof(double), typeof(SearchBar), -1.0, - defaultValueCreator: bindable => Device.GetNamedSize(NamedSize.Default, (SearchBar)bindable)); + public static readonly BindableProperty FontSizeProperty = FontElement.FontSizeProperty; - public static readonly BindableProperty FontAttributesProperty = BindableProperty.Create("FontAttributes", typeof(FontAttributes), typeof(SearchBar), FontAttributes.None); + public static readonly BindableProperty FontAttributesProperty = FontElement.FontAttributesProperty; public static readonly BindableProperty HorizontalTextAlignmentProperty = BindableProperty.Create("HorizontalTextAlignment", typeof(TextAlignment), typeof(SearchBar), TextAlignment.Start); @@ -111,6 +110,21 @@ namespace Xamarin.Forms set { SetValue(FontSizeProperty, value); } } + void IFontElement.OnFontFamilyChanged(string oldValue, string newValue) + { + } + + void IFontElement.OnFontSizeChanged(double oldValue, double newValue) + { + } + + double IFontElement.FontSizeDefaultValueCreator() => + Device.GetNamedSize(NamedSize.Default, (SearchBar)this); + + void IFontElement.OnFontAttributesChanged(FontAttributes oldValue, FontAttributes newValue) + { + } + public event EventHandler SearchButtonPressed; public event EventHandler<TextChangedEventArgs> TextChanged; |