Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Ignite /2/2019 1:15 AM Power Up Your Cross Platform Mobile Code with Platform Specific Features using Xamarin Alec Tucker MOB331 © 2015.

Similar presentations


Presentation on theme: "Microsoft Ignite /2/2019 1:15 AM Power Up Your Cross Platform Mobile Code with Platform Specific Features using Xamarin Alec Tucker MOB331 © 2015."— Presentation transcript:

1

2 Microsoft Ignite 2015 1/2/2019 1:15 AM Power Up Your Cross Platform Mobile Code with Platform Specific Features using Xamarin Alec Tucker MOB331 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

3 Atlanta | Beijing | London | Munich | Sydney | Toronto | Vienna
Microsoft Ignite 2015 1/2/2019 1:15 AM Alec Tucker Head of Mobile Product Development, APAC for The White Clarke Group Microsoft MVP Xamarin MVP Sydney Mobile.Net (Xamarin) Developers Group LEADERS IN FINANCE TECHNOLOGY SYSTEMS Atlanta   |  Beijing  |  London  |  Munich  |  Sydney  |  Toronto  |  Vienna  © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4 Traditional Xamarin.Forms 2.0 Now with UWP support! Shared UI Code
Microsoft Ignite 2015 1/2/2019 1:15 AM Traditional Xamarin.Forms 2.0 Now with UWP support! Custom Renderers Custom Renderers Custom Renderers Views Views Views Shared UI Code Views ViewModels ViewModels Models Services Models Services © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 Xamarin.Forms So Xamarin.Forms is great, right?
Microsoft Ignite 2015 1/2/2019 1:15 AM Xamarin.Forms So Xamarin.Forms is great, right? Right! And it solves all our problems? Er, no… Oh. But it supports native UI controls, right? Of course And it supports ALL native UI controls? Um, no… Oh. It does abstract some API interaction for us, right? Definitely Does it abstract ALL API interactions? Nope Traditional Xamarin can handle all these things Xamarin.Forms provides mechanisms we can use to support them all from a Xamarin.Forms app © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6 Code sharing strategies
Microsoft Ignite 2015 1/2/2019 1:15 AM Code sharing strategies Linked files Shared projects Portable class libraries © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

7 Platform customization options
Microsoft Ignite 2015 1/2/2019 1:15 AM Platform customization options Device.OS, Device.Idiom, Device.OnPlatform DependencyService Custom Renderers Device.OnPlatform( () =>{ // This code runs on iOS platform = "iOS"; }, () => { // This code runs on Android platform = "Android"; // This code runs on WinPhone platform = "WinPhone"; platform = "Default"; } ); TargetPlatform .Android .iOS .Other .Windows .WinPhone TargetIdiom .Desktop .Phone .Tablet .Unsupported [assembly: Xamarin.Forms.Dependency(typeof(Ignite6.ViewModels.BookDetailViewModel))] var vm = DependencyService.Get<BookDetailViewModel>(); DependencyFetchTarget .GlobalInstance .NewInstance platform = Device.OnPlatform<string>("iOS", "Android", "WinPhone"); © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8 Problem: Copy to clipboard
Microsoft Ignite 2015 1/2/2019 1:15 AM Problem: Copy to clipboard iOS UIKit.UIPasteboard.General.String = “Text to copy”; Android Android.Content.ClipboardManager clipboardManager = (Android.Content.ClipboardManager)Forms.Context.GetSystemService( Android.Content.Context.ClipboardService); clipboardManager.Text = “Text to copy"; Windows System.Windows.Clipboard.SetText(“Text to copy”); © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 Problem: Copy to clipboard
Microsoft Ignite 2015 1/2/2019 1:15 AM Problem: Copy to clipboard Option 1: Shared project Use Device.OS / Device.OnPlatform Use pre-compiler directives Pro Tip: “Redth’s Addins” for Xamarin Studio to obliterate output paths © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10 Problem: Copy to clipboard
Microsoft Ignite 2015 1/2/2019 1:15 AM Problem: Copy to clipboard Option 2: Portable class library (PCL) public void CopyToClipboard(string textToCopy) © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

11 Microsoft Ignite 2015 1/2/2019 1:15 AM Check for components Has someone else already done what you’re trying to do? © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

12 Platform UI customisations
Microsoft Ignite 2015 1/2/2019 1:15 AM Platform UI customisations © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13 Check for existing code
Microsoft Ignite 2015 1/2/2019 1:15 AM Check for existing code Has someone else already done what you’re trying to do? © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 Find out more Sydney Mobile .Net (Xamarin) Developers
Microsoft Ignite 2015 1/2/2019 1:15 AM Find out more Sydney Mobile .Net (Xamarin) Developers December 8th: Xamarin 2015 Roundup – win a Xamarin licence!!! Queensland C# Mobile Developers November 24th Melbourne F# Sydney December 1st Alec Tucker @alecdtucker blog.alectucker.com linkedin.com/in/alectucker © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 Complete your session evaluation on My Ignite for your chance to win one of many daily prizes.

16 Continue your Ignite learning path
Microsoft Ignite 2015 1/2/2019 1:15 AM Continue your Ignite learning path Visit Microsoft Virtual Academy for free online training visit Visit Channel 9 to access a wide range of Microsoft training and event recordings Head to the TechNet Eval Centre to download trials of the latest Microsoft products © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

17


Download ppt "Microsoft Ignite /2/2019 1:15 AM Power Up Your Cross Platform Mobile Code with Platform Specific Features using Xamarin Alec Tucker MOB331 © 2015."

Similar presentations


Ads by Google