diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs index 3e3344ff..339bd00a 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/SearchBarRenderer.cs @@ -13,21 +13,18 @@ namespace Xamarin.Forms.Platform.Tizen //TODO: read default platform color static readonly EColor s_defaultPlaceholderColor = EColor.Gray; static readonly EColor s_defaultTextColor = EColor.Black; - /// <summary> - /// Creates a new instance of the <see cref="Xamarin.Forms.Platform.Tizen.SearchBarRenderer"/> class. - /// Registers handlers for various properties of the SearchBar widget. - /// </summary> - public SearchBarRenderer() + + static SearchBarRenderer() { - RegisterPropertyHandler(SearchBar.CancelButtonColorProperty, CancelButtonColorPropertyHandler); - RegisterPropertyHandler(SearchBar.FontAttributesProperty, FontAttributesPropertyHandler); - RegisterPropertyHandler(SearchBar.FontFamilyProperty, FontFamilyPropertyHandler); - RegisterPropertyHandler(SearchBar.FontSizeProperty, FontSizePropertyHandler); - RegisterPropertyHandler(SearchBar.HorizontalTextAlignmentProperty, HorizontalTextAlignmentPropertyHandler); - RegisterPropertyHandler(SearchBar.PlaceholderProperty, PlaceholderPropertyHandler); - RegisterPropertyHandler(SearchBar.PlaceholderColorProperty, PlaceholderColorPropertyHandler); - RegisterPropertyHandler(SearchBar.TextProperty, TextPropertyHandler); - RegisterPropertyHandler(SearchBar.TextColorProperty, TextColorPropertyHandler); + RegisterPropertyHandler(SearchBar.CancelButtonColorProperty, (r) => (r as SearchBarRenderer).CancelButtonColorPropertyHandler()); + RegisterPropertyHandler(SearchBar.FontAttributesProperty, (r) => (r as SearchBarRenderer).FontAttributesPropertyHandler()); + RegisterPropertyHandler(SearchBar.FontFamilyProperty, (r) => (r as SearchBarRenderer).FontFamilyPropertyHandler()); + RegisterPropertyHandler(SearchBar.FontSizeProperty, (r) => (r as SearchBarRenderer).FontSizePropertyHandler()); + RegisterPropertyHandler(SearchBar.HorizontalTextAlignmentProperty, (r) => (r as SearchBarRenderer).HorizontalTextAlignmentPropertyHandler()); + RegisterPropertyHandler(SearchBar.PlaceholderProperty, (r) => (r as SearchBarRenderer).PlaceholderPropertyHandler()); + RegisterPropertyHandler(SearchBar.PlaceholderColorProperty, (r) => (r as SearchBarRenderer).PlaceholderColorPropertyHandler()); + RegisterPropertyHandler(SearchBar.TextProperty, (r) => (r as SearchBarRenderer).TextPropertyHandler()); + RegisterPropertyHandler(SearchBar.TextColorProperty, (r) => (r as SearchBarRenderer).TextColorPropertyHandler()); } |