native ios, android apps using xamarin.forms dotnetconf2016 hyderabad

24
Microsoft User Group Hyderabad dotnetConf 2016 Hyderabad

Upload: pranav-ainavolu

Post on 22-Feb-2017

226 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Microsoft User Group Hyderabad

dotnetConf 2016 Hyderabad

Page 2: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

iOS, Android, and Windows apps in C# and XAML with Xamarin.Forms

Pranav AinavoluMicrosoft MVP | Senior Developer – RealPage@a_pranav | http://pranavon.net/

Page 3: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Xamarin’s Unique Approach

Shared C# codebase • 100% native API access • High performance

Windows-specific C#

Android-specific C#

iOS-specificC#

C# Shared Logic

Page 4: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Windows APIs

Microsoft.Phone Microsoft.Networking

Windows.Storage

Windows.Foundation

Microsoft.Devices

System.Data System.Windows

System.Numerics System.Core System.ServiceMod

el

System.Net System System.IO System.Linq System.Xml

Page 5: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

iOS – 100% API Coverage

MapKit UIKit iBeacon CoreGraphics CoreMotion

System.Data System.Windows

System.Numerics System.Core System.ServiceMod

el

System.Net System System.IO System.Linq System.Xml

Page 6: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Android – 100% API Coverage

Text-to-speech ActionBar Printing Framework Renderscript NFC

System.Data System.Windows

System.Numerics System.Core System.ServiceMod

el

System.Net System System.IO System.Linq System.Xml

Page 7: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Native Performance

Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary for Apple’s App Store.

Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device.

AOT .APP

Page 8: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Visual Studio Integration

Page 9: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Anything you can do in Objective-C, Swift, or Javacan be done in C# and Visual Studio with Xamarin.

Page 10: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Visual Studio Integration

• Xamarin.com/Download

Page 11: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Build native UIs for iOS, Android, and Windows from a single, shared C# codebase.

Meet Xamarin.Forms

Page 12: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Xamarin + Xamarin.Forms

Traditional Xamarin Approach

With Xamarin.Forms:More code-sharing, all

native

Windows-specific C#

Android-specific C#

iOS-specificC#

C# Shared Logic

Xamarin.Forms

C# Shared Logic

Page 13: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

What’s included

✓ 40+ Pages, layouts, and controls (Build from code behind or XAML)✓ Two-way data binding✓ Navigation✓ Animation API✓ Dependency Service✓ Messaging Center

Xamarin.Forms

C# Shared Logic

Page 14: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Layouts

Pages

Stack Absolute Relative Grid ContentView

ScrollView

Frame

Content MasterDetail

Navigation

Tabbed Carousel

Page 15: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

ActivityIndicator BoxView Button DatePicker Editor

Entry Image Label ListView Map

OpenGLView Picker ProgressBar SearchBar Slider

Stepper TableView TimePicker WebView EntryCell

ImageCell SwitchCell TextCell ViewCell

Controls

Page 16: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Xamarin.Forms Ecosystem

Page 17: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

<?xml version="1.0" encoding="UTF-8"?><TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyApp.MainPage"><TabbedPage.Children><ContentPage Title="Profile" Icon="Profile.png"> <StackLayout Spacing="20" Padding="20" VerticalOptions="Center"> <Entry Placeholder="Username" Text="{Binding Username}"/> <Entry Placeholder="Password" Text="{Binding Password}" IsPassword="true"/> <Button Text="Login" TextColor="White" BackgroundColor="#77D065" Command="{Binding LoginCommand}"/> </StackLayout></ContentPage><ContentPage Title="Settings" Icon="Settings.png"> <!-- Settings --></ContentPage></TabbedPage.Children>

Native UI from shared code

Page 18: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

PlatformCustomization

Page 19: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Let’s take a look

Page 20: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Xamarin.Forms 2.0

✓ Windows 10 UWP✓ Control Templates✓ Data Template Selectors✓ More Gestures (Pinch & Pan)✓ XAML Compilation✓ Effects✓ Android Material Design

Xamarin.Forms

C# Shared Logic

Page 21: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

• PDF, ePub, Kindle, iBooks, Google Play Books & More • By Charles Petzold

• http://bit.ly/xamarin-forms-book

Free Xamarin.Forms Book

Page 22: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

Get Started TodayXamarin.com

Page 23: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

<ThankYou />

Page 24: Native iOS, Android apps using Xamarin.Forms   dotnetConf2016 Hyderabad

© 2016 Microsoft Corporation. All rights reserved.

MUGH Facebook Pagehttp://fb.com/themugh

MUGH Twitterhttp://twitter.com/mughtwits

MUGH Bloghttp://mugh.net