[forms-devel] TargetPlatform and Device.OnPlatform Changes
Jason Smith
jason.smith at xamarin.com
Fri May 6 16:55:44 UTC 2016
1) Good
2) It cannot because of the backwards compatibility reasons you already
mentioned. This will have to remain as is. We would have to introduce a
different API for dealing with this, we have considered introducing
Device.Version which would map to the correct version number of the current
device. (e.g. ICS on Android == 4.0.0, UWP = 10.0.x, WinRT = 8.1.x) and so
on but we would need to really work out that spec CAREFULLY.
Switching the enum to a flags enum breaks ABI compat which is pretty
unfriendly to 3rd party components and will break them pretty horribly :/
Jason
On Fri, May 6, 2016 at 6:59 AM, Adam Pedley <adam.pedley at gmail.com> wrote:
> 1) I am all for obsoleting Device.OnPlatform. The other OnPlatform,
> especially its use in Xaml is a great way forward.
>
> 2) Can TargetPlatform also include something for UWP, there is currently
> no way to differentiate WinRT and UWP. However this would have breaking
> changes if people have used Windows for both WinRT and UWP development. Not
> sure how this could be resolved, though I am sure WinRT has a fast
> approaching expiration date, so it might be best to leave it be unless an
> easy solution is apparent to anyone else.
>
> It may have been possible if the TargetPlatform enum used Flags, that way
> it could be Windows and WinRT but too far along now.
>
> Adam
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com
> http://lists.ximian.com/mailman/listinfo/forms-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/forms-devel/attachments/20160506/95998c44/attachment.html>
More information about the forms-devel
mailing list