Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit e5243fa

Browse files
blind fix windows platforms
1 parent 4d418f3 commit e5243fa

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed

Xamarin.Forms.Platform.WP8/Forms.cs

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public static void Init()
5050

5151
Log.Listeners.Add(new DelegateLogListener((c, m) => Console.WriteLine("[{0}] {1}", m, c)));
5252

53-
Device.OS = TargetPlatform.WinPhone;
5453
Device.PlatformServices = new WP8PlatformServices();
5554
Device.Info = new WP8DeviceInfo();
5655

Xamarin.Forms.Platform.WP8/WP8PlatformServices.cs

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public bool IsInvokeRequired
113113
get { return !Deployment.Current.Dispatcher.CheckAccess(); }
114114
}
115115

116+
public string RuntimePlatform => Device.WinPhone;
117+
116118
public void OpenUriAction(Uri uri)
117119
{
118120
Launcher.LaunchUriAsync(uri).WatchForError();

Xamarin.Forms.Platform.WinRT.Phone/Forms.cs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public static void Init (IActivatedEventArgs launchActivatedEventArgs)
2525

2626
Windows.UI.Xaml.Application.Current.Resources.MergedDictionaries.Add (GetPhoneResources());
2727

28-
Device.OS = TargetPlatform.Windows;
2928
Device.PlatformServices = new WindowsPhonePlatformServices (Window.Current.Dispatcher);
3029
Device.Info = new WindowsDeviceInfo();
3130
Device.Idiom = TargetIdiom.Phone;

Xamarin.Forms.Platform.WinRT.Tablet/Forms.cs

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public static void Init(IActivatedEventArgs launchActivatedEventArgs)
4040

4141
Windows.UI.Xaml.Application.Current.Resources.MergedDictionaries.Add(GetTabletResources());
4242

43-
Device.OS = TargetPlatform.Windows;
4443
Device.Idiom = TargetIdiom.Tablet;
4544
Device.PlatformServices = new WindowsPlatformServices(Window.Current.Dispatcher);
4645
Device.Info = new WindowsDeviceInfo();

Xamarin.Forms.Platform.WinRT/WindowsBasePlatformServices.cs

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ public IIsolatedStorageFile GetUserStoreForApplication()
117117

118118
public bool IsInvokeRequired => !CoreApplication.MainView.CoreWindow.Dispatcher.HasThreadAccess;
119119

120+
public string RuntimePlatform => Device.Windows;
121+
120122
public void OpenUriAction(Uri uri)
121123
{
122124
Launcher.LaunchUriAsync(uri).WatchForError();

0 commit comments

Comments
 (0)