diff options
author | Philippe Leybaert <philippe@activa.be> | 2016-10-11 14:15:44 -0500 |
---|---|---|
committer | Stephane Delcroix <stephane@delcroix.org> | 2016-10-11 21:15:44 +0200 |
commit | ec09d75f5815ac11543ca81b6fed433ace5cbb10 (patch) | |
tree | 30dcf454bda1ad439e7eca0a4c086c3fb48f9cd3 | |
parent | caa3816b0c19029be200ce422da19162e85ffc5b (diff) | |
download | xamarin-forms-ec09d75f5815ac11543ca81b6fed433ace5cbb10.tar.gz xamarin-forms-ec09d75f5815ac11543ca81b6fed433ace5cbb10.tar.bz2 xamarin-forms-ec09d75f5815ac11543ca81b6fed433ace5cbb10.zip |
OnIdiom support for Desktop (UWP) (#420)
The current implementation for OnIdiom<T> is missing the Desktop property. When running in a Windows UWP "desktop" app, it always returns the Phone property.
-rw-r--r-- | Xamarin.Forms.Core/OnIdiom.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/OnIdiom.cs b/Xamarin.Forms.Core/OnIdiom.cs index 9376d5b9..24ada865 100644 --- a/Xamarin.Forms.Core/OnIdiom.cs +++ b/Xamarin.Forms.Core/OnIdiom.cs @@ -5,6 +5,8 @@ public T Phone { get; set; } public T Tablet { get; set; } + + public T Desktop { get; set; } public static implicit operator T(OnIdiom<T> onIdiom) { @@ -15,7 +17,9 @@ return onIdiom.Phone; case TargetIdiom.Tablet: return onIdiom.Tablet; + case TargetIdiom.Desktop: + return onIdiom.Desktop; } } } -}
\ No newline at end of file +} |