summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/CellsGalleries
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/CellsGalleries')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellListPage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellTablePage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs14
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ProductViewCell.cs2
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellListPage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellTablePage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellListPage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellTablePage.cs7
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ViewCellGallery.cs7
10 files changed, 21 insertions, 51 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellListPage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellListPage.cs
index 89740fb5..0a9c21b4 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellListPage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellListPage.cs
@@ -18,11 +18,8 @@ namespace Xamarin.Forms.Controls
{
Title = "EntryCell List Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var dataTemplate = new DataTemplate (typeof(EntryCell));
dataTemplate.SetBinding (EntryCell.LabelProperty, new Binding ("Label"));
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellTablePage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellTablePage.cs
index c37dd441..f3fe5e57 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellTablePage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/EntryCellTablePage.cs
@@ -6,11 +6,8 @@ namespace Xamarin.Forms.Controls
{
Title = "EntryCell Table Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
int timesEntered = 1;
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs
index 62ec6940..1071505c 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs
@@ -21,11 +21,8 @@ namespace Xamarin.Forms.Controls
{
Title = "ImageCell List Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var dataTemplate = new DataTemplate (typeof (ImageCell));
var stringToImageSourceConverter = new GenericValueConverter (
@@ -73,11 +70,8 @@ namespace Xamarin.Forms.Controls
{
public UrlImageCellListPage()
{
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var dataTemplate = new DataTemplate (typeof (ImageCell));
var stringToImageSourceConverter = new GenericValueConverter (
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs
index 2b941bfd..988c8a7f 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs
@@ -7,11 +7,8 @@ namespace Xamarin.Forms.Controls
{
Title = "ImageCell Table Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var tableSection = new TableSection ("Section One") {
new ImageCell { Text = "Text 1", ImageSource = new FileImageSource { File = "crimson.jpg" } },
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ProductViewCell.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ProductViewCell.cs
index 5973ebab..e0b4b9df 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ProductViewCell.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ProductViewCell.cs
@@ -20,7 +20,7 @@ namespace Xamarin.Forms.Controls
var frame = new Frame {
Content = _stack,
- BackgroundColor = Device.OnPlatform (iOS: new Color (1), Android: new Color (0.2), WinPhone: new Color (0.2))
+ BackgroundColor = new[] { Device.Android, Device.Windows, Device.WinPhone }.Contains(Device.RuntimePlatform) ? new Color(0.2) : new Color(1)
};
_timeLabel = new Label {
Text = text
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellListPage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellListPage.cs
index 799d6989..0d336b34 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellListPage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellListPage.cs
@@ -16,11 +16,8 @@ namespace Xamarin.Forms.Controls
{
Title = "SwitchCell List Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var dataTemplate = new DataTemplate (typeof (SwitchCell)) {
Bindings = {
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellTablePage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellTablePage.cs
index a0deb8e6..5a92ed4b 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellTablePage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/SwitchCellTablePage.cs
@@ -6,11 +6,8 @@ namespace Xamarin.Forms.Controls
{
Title = "SwitchCell Table Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var tableSection = new TableSection ("Section One") {
new SwitchCell { Text = "text 1", On = true },
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellListPage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellListPage.cs
index 2b2761e7..e2f071b6 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellListPage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellListPage.cs
@@ -17,11 +17,8 @@ namespace Xamarin.Forms.Controls
{
Title = "TextCell List Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var label = new Label { Text = "Not Selected" };
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellTablePage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellTablePage.cs
index b9cc0cf3..fa1697b1 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellTablePage.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/TextCellTablePage.cs
@@ -7,11 +7,8 @@ namespace Xamarin.Forms.Controls
{
Title = "TextCell Table Gallery - Legacy";
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var tableSection = new TableSection ("Section One") {
new TextCell { Text = "Text 1" },
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ViewCellGallery.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ViewCellGallery.cs
index 099a786a..f256abeb 100644
--- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ViewCellGallery.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ViewCellGallery.cs
@@ -31,11 +31,8 @@ namespace Xamarin.Forms.Controls
{
public UrlImageViewCellListPage()
{
- Device.OnPlatform (iOS: () => {
- if (Device.Idiom == TargetIdiom.Tablet) {
- Padding = new Thickness (0, 0, 0, 60);
- }
- });
+ if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet)
+ Padding = new Thickness(0, 0, 0, 60);
var stringToImageSourceConverter = new GenericValueConverter (
obj => new UriImageSource() {