summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WP8/Platform.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2016-04-11 19:22:14 -0600
committerJason Smith <jason.smith@xamarin.com>2016-04-11 18:22:14 -0700
commit0a20bdaa3c373ec303c9a94ae45ecaa144996ba5 (patch)
treec4f2f38a34170800a8ae60da0e08f4546562fe14 /Xamarin.Forms.Platform.WP8/Platform.cs
parent90d8976cfdadc1582e366c0b6f6611d6fe83f5ff (diff)
downloadxamarin-forms-0a20bdaa3c373ec303c9a94ae45ecaa144996ba5.tar.gz
xamarin-forms-0a20bdaa3c373ec303c9a94ae45ecaa144996ba5.tar.bz2
xamarin-forms-0a20bdaa3c373ec303c9a94ae45ecaa144996ba5.zip
Fix warnings 0219 and 0618 in WP8 Platform (#63)
* Fix warnings 0219 and 0618 in WP8 Platform Remove suppression of warnings 0219 and 0618 in WP8 Platform * Remove pragma for 0618 and use Platform.GetRenderer * All warnings as errors in Release configuration
Diffstat (limited to 'Xamarin.Forms.Platform.WP8/Platform.cs')
-rw-r--r--Xamarin.Forms.Platform.WP8/Platform.cs12
1 files changed, 3 insertions, 9 deletions
diff --git a/Xamarin.Forms.Platform.WP8/Platform.cs b/Xamarin.Forms.Platform.WP8/Platform.cs
index 84a3e769..cda86bc9 100644
--- a/Xamarin.Forms.Platform.WP8/Platform.cs
+++ b/Xamarin.Forms.Platform.WP8/Platform.cs
@@ -542,9 +542,7 @@ namespace Xamarin.Forms.Platform.WinPhone
var button = new TaggedAppBarButton
{
IconUri = new Uri(item.Icon ?? "ApplicationIcon.jpg", UriKind.Relative),
-#pragma warning disable 618
- Text = !string.IsNullOrWhiteSpace(item.Name) ? item.Text : (string)item.Icon ?? "ApplicationIcon.jpg",
-#pragma warning restore 618
+ Text = !string.IsNullOrWhiteSpace(item.Text) ? item.Text : (string)item.Icon ?? "ApplicationIcon.jpg",
IsEnabled = item.IsEnabled,
Tag = item
};
@@ -558,9 +556,7 @@ namespace Xamarin.Forms.Platform.WinPhone
if (_page.ApplicationBar.MenuItems.OfType<TaggedAppBarMenuItem>().Any(b => b.Tag == item))
continue;
-#pragma warning disable 618
- var button = new TaggedAppBarMenuItem { Text = !string.IsNullOrWhiteSpace(item.Name) ? item.Text : (string)item.Icon ?? "MenuItem", IsEnabled = true, Tag = item };
-#pragma warning restore 618
+ var button = new TaggedAppBarMenuItem { Text = !string.IsNullOrWhiteSpace(item.Text) ? item.Text : (string)item.Icon ?? "MenuItem", IsEnabled = true, Tag = item };
button.Click += (sender, args) => item.Activate();
menuItemsToAdd.Add(button);
}
@@ -630,9 +626,7 @@ namespace Xamarin.Forms.Platform.WinPhone
if (e.PropertyName == MenuItem.IsEnabledProperty.PropertyName)
IsEnabled = item.IsEnabled;
else if (e.PropertyName == MenuItem.TextProperty.PropertyName)
-#pragma warning disable 618
- Text = !string.IsNullOrWhiteSpace(item.Name) ? item.Text : (string)item.Icon ?? "ApplicationIcon.jpg";
-#pragma warning restore 618
+ Text = !string.IsNullOrWhiteSpace(item.Text) ? item.Text : (string)item.Icon ?? "ApplicationIcon.jpg";
else if (e.PropertyName == MenuItem.IconProperty.PropertyName)
IconUri = new Uri(item.Icon ?? "ApplicationIcon.jpg", UriKind.Relative);
}