summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs b/Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs
index 0558b192..896085a3 100644
--- a/Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs
+++ b/Xamarin.Forms.Controls/GalleryPages/ButtonGallery.cs
@@ -31,8 +31,21 @@ namespace Xamarin.Forms.Controls
var click = new Button { Text = "Click Button" };
var rotate = new Button { Text = "Rotate Button" };
var transparent = new Button { Text = "Transparent Button" };
+ string fontName;
+ switch (Device.RuntimePlatform) {
+ default:
+ case Device.iOS:
+ fontName = "Georgia";
+ break;
+ case Device.Android:
+ fontName = "sans-serif-light";
+ break;
+ case Device.WinPhone:
+ case Device.Windows:
+ fontName = "Comic Sans MS";
+ break;
+ }
- var fontName = Device.OnPlatform ("Georgia", "sans-serif-light", "Comic Sans MS");
var font = Font.OfSize (fontName, NamedSize.Medium);
var themedButton = new Button {