From b2e2a8ff2a768e01fd8ee155c519de4bee310fb3 Mon Sep 17 00:00:00 2001 From: Paul DiPietro Date: Fri, 18 Nov 2016 06:38:30 -0600 Subject: [PATCH] Platform specifics naming adjustments (#526) --- .../PlatformSpecificsGalleries/EntryPageiOS.cs | 2 +- .../TabbedPageAndroid.cs | 2 +- .../AndroidSpecific/TabbedPage.cs | 10 ++--- .../PlatformConfiguration/iOSSpecific/Entry.cs | 6 +-- .../Renderers/EntryRenderer.cs | 2 +- .../TabbedPage.xml | 18 ++++----- .../Entry.xml | 46 +++++++++++----------- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/EntryPageiOS.cs b/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/EntryPageiOS.cs index 8893678..9093c3b 100644 --- a/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/EntryPageiOS.cs +++ b/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/EntryPageiOS.cs @@ -23,7 +23,7 @@ namespace Xamarin.Forms.Controls.GalleryPages.PlatformSpecificsGalleries new Button { Text = "Toggle AdjustsFontSizeToFitWidth", - Command = new Command(() => entry.On().SetAdjustsFontSizeToFitWidth(!entry.On().AdjustsFontSizeToFitWidth())) + Command = new Command(() => entry.On().SetAdjustsFontSizeToFitWidthEnabled(!entry.On().IsAdjustsFontSizeToFitWidthEnabled())) } } }; diff --git a/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/TabbedPageAndroid.cs b/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/TabbedPageAndroid.cs index ab1904a..dff3b29 100644 --- a/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/TabbedPageAndroid.cs +++ b/Xamarin.Forms.Controls/GalleryPages/PlatformSpecificsGalleries/TabbedPageAndroid.cs @@ -18,7 +18,7 @@ namespace Xamarin.Forms.Controls.GalleryPages.PlatformSpecificsGalleries Children.Add(CreateAdditonalPage()); Children.Add(CreateAdditonalPage()); Children.Add(CreateAdditonalPage()); - On().SetOffscreenPageLimitProperty(2); + On().SetOffscreenPageLimit(2); } ContentPage CreateFirstPage(ICommand restore) diff --git a/Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs b/Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs index 5cec97e..dc4d1e1 100644 --- a/Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/TabbedPage.cs @@ -45,24 +45,24 @@ BindableProperty.Create("OffscreenPageLimit", typeof(int), typeof(TabbedPage), 3, validateValue: (binding, value) => (int)value >= 0); - public static int GetOffscreenPageLimitProperty(BindableObject element) + public static int GetOffscreenPageLimit(BindableObject element) { return (int)element.GetValue(OffscreenPageLimitProperty); } - public static void SetOffscreenPageLimitProperty(BindableObject element, int value) + public static void SetOffscreenPageLimit(BindableObject element, int value) { element.SetValue(OffscreenPageLimitProperty, value); } public static int OffscreenPageLimit(this IPlatformElementConfiguration config) { - return GetOffscreenPageLimitProperty(config.Element); + return GetOffscreenPageLimit(config.Element); } - public static IPlatformElementConfiguration SetOffscreenPageLimitProperty(this IPlatformElementConfiguration config, int value) + public static IPlatformElementConfiguration SetOffscreenPageLimit(this IPlatformElementConfiguration config, int value) { - SetOffscreenPageLimitProperty(config.Element, value); + SetOffscreenPageLimit(config.Element, value); return config; } } diff --git a/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Entry.cs b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Entry.cs index ddd1d63..494bb12 100644 --- a/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Entry.cs +++ b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/Entry.cs @@ -7,7 +7,7 @@ namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific public static class Entry { public static readonly BindableProperty AdjustsFontSizeToFitWidthProperty = - BindableProperty.Create("AdjustsFontSizeToFitWidth", typeof(bool), + BindableProperty.Create("AdjustsFontSizeToFitWidthEnabled", typeof(bool), typeof(Entry), false); public static bool GetAdjustsFontSizeToFitWidth(BindableObject element) @@ -20,12 +20,12 @@ namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific element.SetValue(AdjustsFontSizeToFitWidthProperty, value); } - public static bool AdjustsFontSizeToFitWidth(this IPlatformElementConfiguration config) + public static bool IsAdjustsFontSizeToFitWidthEnabled(this IPlatformElementConfiguration config) { return GetAdjustsFontSizeToFitWidth(config.Element); } - public static IPlatformElementConfiguration SetAdjustsFontSizeToFitWidth(this IPlatformElementConfiguration config, bool value) + public static IPlatformElementConfiguration SetAdjustsFontSizeToFitWidthEnabled(this IPlatformElementConfiguration config, bool value) { SetAdjustsFontSizeToFitWidth(config.Element, value); return config; diff --git a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs index c56060a..e4536cf 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs @@ -144,7 +144,7 @@ namespace Xamarin.Forms.Platform.iOS void UpdateAdjustsFontSizeToFitWidth() { - Control.AdjustsFontSizeToFitWidth = Element.OnThisPlatform().AdjustsFontSizeToFitWidth(); + Control.AdjustsFontSizeToFitWidth = Element.OnThisPlatform().IsAdjustsFontSizeToFitWidthEnabled(); } void UpdateFont() diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.AndroidSpecific/TabbedPage.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.AndroidSpecific/TabbedPage.xml index 2784df9..6ab3370 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.AndroidSpecific/TabbedPage.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.AndroidSpecific/TabbedPage.xml @@ -74,9 +74,9 @@ To be added. - - - + + + Method 2.0.0.0 @@ -207,9 +207,9 @@ To be added. - - - + + + Method 2.0.0.0 @@ -228,9 +228,9 @@ To be added. - - - + + + Method 2.0.0.0 diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Entry.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Entry.xml index 1671146..980c24b 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Entry.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms.PlatformConfiguration.iOSSpecific/Entry.xml @@ -14,26 +14,6 @@ To be added. - - - - Method - - 2.0.0.0 - - - System.Boolean - - - - - - To be added. - To be added. - To be added. - To be added. - - @@ -109,6 +89,26 @@ To be added. + + + + Method + + 2.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + @@ -130,9 +130,9 @@ To be added. - - - + + + Method 2.0.0.0 -- 2.7.4