Native i os, android, and windows development in c# with xamarin 4
-
Upload
xamarin -
Category
Technology
-
view
3.277 -
download
3
Transcript of Native i os, android, and windows development in c# with xamarin 4
James MontemagnoDeveloper Evangelist, Xamarin
4
The future of apps
@JamesMontemagno
Make it fast, easy, and fun to create great mobile apps.
Xamarin’s Mission
Xamarin – Your Complete Mobile Solution
BUILD TEST MONITOR
ACCELERATE
BUILD TEST MONITOR
ACCELERATE
Xamarin – Your Complete Mobile Solution
Xamarin’s Unique Approach
Shared C# codebase • 100% native API access • High performance
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Mobile
Windows APIs
Microsoft.Phone Microsoft.Networking Windows.Storage Windows.Foundation Microsoft.Devices
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
iOS – 100% API Coverage
MapKit UIKit iBeacon CoreGraphics CoreMotion
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
Android – 100% API Coverage
Text-‐to-‐speech ActionBar Printing Framework Renderscript NFC
System.Data System.Windows System.Numerics System.Core System.ServiceModel
System.Net System System.IO System.Linq System.Xml
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.
.NET
C# Compileand Link .APK
Bindings
RunsNatively
IL+
JIT
✓Always Up-‐to-‐Date
••••••
•••••
Visual Studio Xamarin Studio
Xamarin.com/Download
Visual Studio Integration
Let’s take a look
Meet Xamarin.Forms
Xamarin + Xamarin.Forms
Traditional Xamarin Approach
With Xamarin.Forms:More code-‐sharing, all native
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Backend
Shared UI Code
Shared C# Backend
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
Shared C# Backend
Shared UI Code
Layouts
Pages
Stack Absolute Relative Grid ContentView ScrollView Frame
Content MasterDetail Navigation Tabbed Carousel
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
Xamarin.Forms Ecosystem
Windows Xamarin.FormsStackPanel StackLayoutTextBox EntryListBox ListViewCheckBox SwitchProgressBar ActivityIndicatorGrid GridLabel LabelButton ButtonImage ImageDate/TimePicker Date/TimePicker
Control Comparison
Windows Xamarin.Forms
DataContext BindingContext
{Binding Property} {Binding Property}
ItemsSource ItemsSource
ItemTemplate ItemTemplate
DataTemplate DataTemplate
BindingComparison
PlatformCustomization
<?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
Let’s take a look
9
What’s new in Xamarin Platform?
Enhanced VS IntegrationXamarin.Forms 2.0 iOS 9 & Android M PreviewTechnologies
Xamarin.Forms 2.0
Xamarin.Forms 2.0: Material Design
https://blog.xamarin.com/material-‐design-‐for-‐your-‐xamarin-‐forms-‐android-‐apps/
Xamarin.Forms 2.0: Material Design
https://blog.xamarin.com/material-‐design-‐for-‐your-‐xamarin-‐forms-‐android-‐apps/
Xamarin.Forms 2.0: ListView Optimizations
http://developer.xamarin.com/guides/cross-‐platform/xamarin-‐forms/user-‐interface/listview/performance/
Xamarin.Forms 2.0: ListView Optimizations
http://developer.xamarin.com/guides/cross-‐platform/xamarin-‐forms/user-‐interface/listview/performance/
Xamarin.Forms 2.0: XAML Optimizations
https://developer.xamarin.com/guides/cross-‐platform/xamarin-‐forms/user-‐interface/xaml-‐basics/xamlc/
Xamarin.Forms 2.0: XAML Optimizations
https://developer.xamarin.com/guides/cross-‐platform/xamarin-‐forms/user-‐interface/xaml-‐basics/xamlc/
Xamarin.Forms 2.0: Windows 10 (﴾UWP)﴿ Preview
https://blog.xamarin.com/getting-‐started-‐with-‐xamarin-‐forms-‐windows-‐10-‐preview/
Let’s take a look
Visual Studio Integration Enhancements
9
Enhanced iOS & Android Designers
Preview Technologies
Profiler Objective SharpieCocoaPod Integration Inspector
Get Started Todayxamarin.com
Free 30 Day Trial -‐ xamarin.com/university
Unrivaled Mobile Development
Training
Live unlimited mobile development training from mobile experts, in your time-‐zone, on your schedule, and as often as you'd like.
evolve.xamarin.com
Resources:
Thank you.
JamesMontemagnoDeveloper Evangelist, Xamarin
[email protected] motzcod.es @JamesMontemagno
Questions?