SlideShare una empresa de Scribd logo
1 de 60
rumar@microsoft.com
http://ruimarinho.net
Native User Interfaces Native API Access Native Performance
Silo approach
iOS WindowsAndroid
Objective-C/Swift
Xcode
C#
Visual Studio
Java
Android Studio
No shared code • Many languages and development environments • Multiple teams
Write once, run anywhere
Lua
Javascript
Actionscript
HTML+CSS
Limited native API access • Slow performance • Poor user experience
App
generator
iOS C# UI Windows C# UIAndroid C# UI
Shared C# logic
Xamarin’s unique approach
Shared C# codebase • 100% native API access • High performance
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
C#
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
C#
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
C#
Xamarin Native approach
3 Native User Interfaces
Shared App Logic
Shared C# Logic
Windows C#Android C#iOS C#
Xamarin.Forms- Cross Platform UI
Shared Native User Interface
Shared App Logic
Shared C# Logic
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
Native UI
ContentPage Label Picker
Android Activity / Fragment TextView AlertDialog + LinearLayout + EditText + NumberPicker
iOS UIViewController UILabel UITextField + UIPickerView + UIToolbar + UIBarButtonItem
UWP Page TextBlock ComboBox
developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/renderers/
macOS Preview
Enhanced GestureRecognizers
Android Support Libraries
PlatformSpecifics
Fast Scroll
NavigationPage Translucency
Blur Behind
.netstandard support
Partial Collapse MasterPage
Native Control Binding
Map Extensibility
Fast Renderers Preview
Startup Time
ListView Scrolling
Memory Improvements
XAMLC
Bindable Picker
Frame Corners
Tizen
Forms Previewer
FlexLayout Preview
Xamarin.Forms Embedding
DataPages
• Aggressive bug triage
• New issues reviewed within 24 hrs
• Reproduction projects for quick resolution
• Performance Improvements
• Startup Time
• Fast Renderers for Android
• ListView improvements, Fast Scroll
• XAMLC – 5x faster
• Discussion: aka.ms/xfperformance
Quality and Performance
Source: Matthew Robbins - MFractor
2.4.0
• .NET Standard 2.0
• Stability and Performance
• Over 150 fixes
• New Feature Flags API
• Android Fast Renderers: Button, Image, Label
• macOS Preview
vNext
• Page Embedding
• Layout Compression
• Right-to-Left
• ListView enhancements
• Gesture enhancements
• FlexLayout
• VSM
• macOS, GTK
XAML Standard
• Lots of feedback!
• Reconciling the APIs we can without breakage
• Share implementations of
• x:Bind
• Visual State Manager
Xamarin.Forms
Page Embedding
Shared C# Logic
Windows C#Android C#iOS C#
iOS
Obj-C
Swift
Android Java ?
• public class ButtonRenderer : ViewRenderer<Button, AppCompatButton>, AView.IOnAttachStateChangeListener
{
ButtonBackgroundTracker _backgroundTracker;
TextColorSwitcher _textColorSwitcher;
float _defaultFontSize;
Typeface _defaultTypeface;
bool _isDisposed;
int _imageHeight = -1;
public ButtonRenderer()
{
AutoPackage = false;
}
global::Android.Widget.Button NativeButton => Control;
…..
• internal sealed class ButtonRenderer : AppCompatButton, IVisualElementRenderer, AView.IOnAttachStateChangeListener,
AView.IOnFocusChangeListener, IEffectControlProvider, AView.IOnClickListener, AView.IOnTouchListener
{
public event EventHandler<VisualElementChangedEventArgs> ElementChanged;
public event EventHandler<PropertyChangedEventArgs> ElementPropertyChanged;
public ButtonRenderer() : base(Forms.Context)
{
_automationPropertiesProvider = new AutomationPropertiesProvider(this);
_effectControlProvider = new EffectControlProvider(this);
_textColorSwitcher = new Lazy<TextColorSwitcher>(() => new TextColorSwitcher(TextColors));
Initialize();
}
…..
Layout Lifecycle:
Invalidation Loop Has Parent?
InvalidateMeasure Called
Call InvalidateMeasure on
Parent
Queue Delay Layout
Yes
No
1
2
3
4
Has Parent?
InvalidateMeasure Called
Call InvalidateMeasure on
Parent
Queue Delay Layout
Yes
No
1
2
3
4
Wait for event
callback to happen
and trigger the layout
mechanism
5
Has
Children?
LayoutChildren Invoked
Layout called
6
7
8
Yes
No
Layout Cycle Completed
9
Layout Lifecycle:
Layout Loop
Grid
StackLayout
ContentView
Label
Button WebView
Grid
Label Button Image ScrollView
Image
Panel
Panel
Panel
LabelRenderer
TextBlock
ButtonRenderer
Button
WebViewRenderer
WebView
Panel
LabelRenderer
Label
ButtonRenderer
Button
ImageRenderer
Image
ScrollViewRenderer
ImageRenderer
Image
Forms
UWP
Grid
StackLayout
ContentView
Label
Button WebView
Grid
Label Button Image ScrollView
Image
Panel
LabelRenderer
TextBlock
ButtonRenderer
Button
WebViewRenderer
WebView
LabelRenderer
Label
ButtonRenderer
Button
ImageRenderer
Image
ScrollViewRenderer
ImageRenderer
Image
Forms
UWP+Compression
Grid
StackLayout
ContentView
Label
Button WebView
Grid
Label Button Image ScrollView
Image
Panel
LabelRenderer ButtonRenderer WebViewRenderer
WebView
LabelRenderer ButtonRenderer ImageRenderer ScrollViewRenderer
ImageRenderer
Forms
UWP+Compression+Fast Renderers
Pros:
less renderers to create, manage and dispose
less UI elements on screen
Cons:
compressed layouts can't have BG colors, gesture recognizers
no transformation
FlexLayout Example
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x=http://schemas.microsoft.com/winfx/2009/xaml
x:Class="FormsFlexLayoutDemo.FlexDemoPage">
<FlexLayout x:Name="flexbox”>
<Label Text="Flex Element 1" />
<Label Text="Flex Element 2" />
<Label Text="Flex Element 3" />
<Label Text="Flex Element 4" />
<Label Text="Flex Element 5" />
</FlexLayout>
</ContentPage>
Flex Element 1 Flex Element 2 Flex Element 3
Flex Element 4 Flex Element 5
AlignContent AlignItems Position Overflow
Wrap Order AlignSelf Flex
JustifyContent IsIncluded Grow Shrink
FlexLayout Properties
Floating Action Button
An Android-only control that has no
Xamarin.Forms abstraction.
#if to target only the desired platform
Add the FAB
• Continuously deploy & debug apps
Xamarin Live Player
Xamarin Live Player Setup
Call to action
• Get started: xamarin.com/download
• Use Xamarin.Forms 2.4.0 today!
• Try Page Embedding, Layout Compression today from the Nightly Feed:
• https://github.com/xamarin/Xamarin.Forms/wiki/Nightly-Builds
Open Source – open.xamarin.com
Sponsored By
Thank you.
Questions?
Rui Marinho
Software Engineer, Xamarin Forms, Mobile Developer Tools
@ruiespinho

Más contenido relacionado

La actualidad más candente

Twelve ways to make your apps suck less
Twelve ways to make your apps suck lessTwelve ways to make your apps suck less
Twelve ways to make your apps suck lessFons Sonnemans
 
Developing and Deploying Windows 10 Apps
Developing and Deploying Windows 10 AppsDeveloping and Deploying Windows 10 Apps
Developing and Deploying Windows 10 AppsFons Sonnemans
 
DNN Web API For Mobile
DNN Web API For MobileDNN Web API For Mobile
DNN Web API For Mobileashishpd
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
Xamarin Roadshow
Xamarin RoadshowXamarin Roadshow
Xamarin RoadshowSam Basu
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint DevelopmentChakkaradeep Chandran
 
Building cross platform web apps
Building cross platform web appsBuilding cross platform web apps
Building cross platform web appsITEM
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCBilal Amjad
 
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Building & Designing Windows 10 Universal Windows Apps using XAML and C#Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Building & Designing Windows 10 Universal Windows Apps using XAML and C#Fons Sonnemans
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Netvidyamittal
 
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
Андрей Бойко -  Azure Web App для PHP и Node.Js разработчиковАндрей Бойко -  Azure Web App для PHP и Node.Js разработчиков
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиковHackraft
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentationdimuthu22
 
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...Matt Spradley
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web applicationRahul Bansal
 
Dev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar BhattiDev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar BhattiTaswar Bhatti
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsJames Pearce
 
Xamarin workshop
Xamarin workshopXamarin workshop
Xamarin workshopNguyen Hieu
 
Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013Fons Sonnemans
 

La actualidad más candente (20)

Twelve ways to make your apps suck less
Twelve ways to make your apps suck lessTwelve ways to make your apps suck less
Twelve ways to make your apps suck less
 
Developing and Deploying Windows 10 Apps
Developing and Deploying Windows 10 AppsDeveloping and Deploying Windows 10 Apps
Developing and Deploying Windows 10 Apps
 
DNN Web API For Mobile
DNN Web API For MobileDNN Web API For Mobile
DNN Web API For Mobile
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
Xamarin Roadshow
Xamarin RoadshowXamarin Roadshow
Xamarin Roadshow
 
Xamarin - Beyond the Basics
Xamarin - Beyond the BasicsXamarin - Beyond the Basics
Xamarin - Beyond the Basics
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
Building cross platform web apps
Building cross platform web appsBuilding cross platform web apps
Building cross platform web apps
 
ASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVCASP.NET - Introduction to Web Forms and MVC
ASP.NET - Introduction to Web Forms and MVC
 
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Building & Designing Windows 10 Universal Windows Apps using XAML and C#Building & Designing Windows 10 Universal Windows Apps using XAML and C#
Building & Designing Windows 10 Universal Windows Apps using XAML and C#
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Net
 
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
Андрей Бойко -  Azure Web App для PHP и Node.Js разработчиковАндрей Бойко -  Azure Web App для PHP и Node.Js разработчиков
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
Dev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar BhattiDev days 1 Introduction to Xamarin Taswar Bhatti
Dev days 1 Introduction to Xamarin Taswar Bhatti
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
Xamarin workshop
Xamarin workshopXamarin workshop
Xamarin workshop
 
Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013Designing XAML apps using Blend for Visual Studio 2013
Designing XAML apps using Blend for Visual Studio 2013
 
ASP.NET Basics
ASP.NET Basics ASP.NET Basics
ASP.NET Basics
 

Similar a Native User Interfaces with Shared C# Code

Build 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsBuild 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsWindows Developer
 
Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)BizTalk360
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Xamarin
 
Cross platform app dev with xamarin forms
Cross platform app dev with xamarin formsCross platform app dev with xamarin forms
Cross platform app dev with xamarin formsShahriar Hossain
 
Xamarin Dev Days 2016 introduction to xamarin
Xamarin Dev Days 2016   introduction to xamarinXamarin Dev Days 2016   introduction to xamarin
Xamarin Dev Days 2016 introduction to xamarinDan Ardelean
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days -  Xamarin.FormsXamarin Dev Days -  Xamarin.Forms
Xamarin Dev Days - Xamarin.FormsJavier Suárez Ruiz
 
Mobile development with xamarin
Mobile development with xamarinMobile development with xamarin
Mobile development with xamarinMatthew Soucoup
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...Malin Weiss
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...Speedment, Inc.
 
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
Xamarin Dev Days Madrid 2017 -  Xamarin.FormsXamarin Dev Days Madrid 2017 -  Xamarin.Forms
Xamarin Dev Days Madrid 2017 - Xamarin.FormsJavier Suárez Ruiz
 
Introduccion Xamarin Open Closed
Introduccion Xamarin Open ClosedIntroduccion Xamarin Open Closed
Introduccion Xamarin Open ClosedIvan Martinez
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발영욱 김
 
Xamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiXamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiHoussem Dellai
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinPranav Ainavolu
 
Xamarin como acelerador y solución de negocio
Xamarin como acelerador y solución de negocioXamarin como acelerador y solución de negocio
Xamarin como acelerador y solución de negocioFlorencia Nodar💻
 
MERN Stack Developer Course Syllabus
MERN Stack Developer Course Syllabus MERN Stack Developer Course Syllabus
MERN Stack Developer Course Syllabus NxtWave
 

Similar a Native User Interfaces with Shared C# Code (20)

Intro to Xamarin
Intro to XamarinIntro to Xamarin
Intro to Xamarin
 
Build 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.FormsBuild 2017 - B8099 - What's new in Xamarin.Forms
Build 2017 - B8099 - What's new in Xamarin.Forms
 
Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)Introduction to Cross Platform Mobile Apps (Xamarin)
Introduction to Cross Platform Mobile Apps (Xamarin)
 
Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4Native i os, android, and windows development in c# with xamarin 4
Native i os, android, and windows development in c# with xamarin 4
 
Cross platform app dev with xamarin forms
Cross platform app dev with xamarin formsCross platform app dev with xamarin forms
Cross platform app dev with xamarin forms
 
Xamarin Dev Days 2016 introduction to xamarin
Xamarin Dev Days 2016   introduction to xamarinXamarin Dev Days 2016   introduction to xamarin
Xamarin Dev Days 2016 introduction to xamarin
 
Xamarin Dev Days - Xamarin.Forms
Xamarin Dev Days -  Xamarin.FormsXamarin Dev Days -  Xamarin.Forms
Xamarin Dev Days - Xamarin.Forms
 
Mobile development with xamarin
Mobile development with xamarinMobile development with xamarin
Mobile development with xamarin
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
Introduction to Xamarin
Introduction to XamarinIntroduction to Xamarin
Introduction to Xamarin
 
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
Xamarin Dev Days Madrid 2017 -  Xamarin.FormsXamarin Dev Days Madrid 2017 -  Xamarin.Forms
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
 
Introduccion Xamarin Open Closed
Introduccion Xamarin Open ClosedIntroduccion Xamarin Open Closed
Introduccion Xamarin Open Closed
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
Xamarin Overview by Houssem Dellai
Xamarin Overview by Houssem DellaiXamarin Overview by Houssem Dellai
Xamarin Overview by Houssem Dellai
 
Metaworks4 intro
Metaworks4 introMetaworks4 intro
Metaworks4 intro
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with Xamarin
 
Xamarin como acelerador y solución de negocio
Xamarin como acelerador y solución de negocioXamarin como acelerador y solución de negocio
Xamarin como acelerador y solución de negocio
 
MERN Stack Developer Course Syllabus
MERN Stack Developer Course Syllabus MERN Stack Developer Course Syllabus
MERN Stack Developer Course Syllabus
 

Último

哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...wyqazy
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Niamh verma
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 

Último (9)

哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
哪里有卖的《俄亥俄大学学历证书+俄亥俄大学文凭证书+俄亥俄大学学位证书》Q微信741003700《俄亥俄大学学位证书复制》办理俄亥俄大学毕业证成绩单|购买...
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
Chandigarh Call Girls Service ❤️🍑 9115573837 👄🫦Independent Escort Service Cha...
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 

Native User Interfaces with Shared C# Code

  • 1.
  • 2.
  • 4.
  • 5. Native User Interfaces Native API Access Native Performance
  • 6.
  • 7. Silo approach iOS WindowsAndroid Objective-C/Swift Xcode C# Visual Studio Java Android Studio No shared code • Many languages and development environments • Multiple teams
  • 8. Write once, run anywhere Lua Javascript Actionscript HTML+CSS Limited native API access • Slow performance • Poor user experience App generator
  • 9. iOS C# UI Windows C# UIAndroid C# UI Shared C# logic Xamarin’s unique approach Shared C# codebase • 100% native API access • High performance
  • 10.
  • 11. 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 C#
  • 12. 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 C#
  • 13. 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 C#
  • 14.
  • 15. Xamarin Native approach 3 Native User Interfaces Shared App Logic Shared C# Logic Windows C#Android C#iOS C#
  • 16. Xamarin.Forms- Cross Platform UI Shared Native User Interface Shared App Logic Shared C# Logic Shared UI Code
  • 17. Layouts Pages Stack Absolute Relative Grid ContentView ScrollView Frame Content MasterDetail Navigation Tabbed Carousel
  • 18. 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
  • 19. Native UI ContentPage Label Picker Android Activity / Fragment TextView AlertDialog + LinearLayout + EditText + NumberPicker iOS UIViewController UILabel UITextField + UIPickerView + UIToolbar + UIBarButtonItem UWP Page TextBlock ComboBox developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/renderers/
  • 20. macOS Preview Enhanced GestureRecognizers Android Support Libraries PlatformSpecifics Fast Scroll NavigationPage Translucency Blur Behind .netstandard support Partial Collapse MasterPage Native Control Binding Map Extensibility Fast Renderers Preview Startup Time ListView Scrolling Memory Improvements XAMLC Bindable Picker Frame Corners Tizen Forms Previewer FlexLayout Preview Xamarin.Forms Embedding DataPages
  • 21. • Aggressive bug triage • New issues reviewed within 24 hrs • Reproduction projects for quick resolution • Performance Improvements • Startup Time • Fast Renderers for Android • ListView improvements, Fast Scroll • XAMLC – 5x faster • Discussion: aka.ms/xfperformance Quality and Performance Source: Matthew Robbins - MFractor
  • 22.
  • 23. 2.4.0 • .NET Standard 2.0 • Stability and Performance • Over 150 fixes • New Feature Flags API • Android Fast Renderers: Button, Image, Label • macOS Preview
  • 24. vNext • Page Embedding • Layout Compression • Right-to-Left • ListView enhancements • Gesture enhancements • FlexLayout • VSM • macOS, GTK
  • 25. XAML Standard • Lots of feedback! • Reconciling the APIs we can without breakage • Share implementations of • x:Bind • Visual State Manager
  • 26.
  • 27. Xamarin.Forms Page Embedding Shared C# Logic Windows C#Android C#iOS C# iOS Obj-C Swift Android Java ?
  • 28.
  • 29.
  • 30. • public class ButtonRenderer : ViewRenderer<Button, AppCompatButton>, AView.IOnAttachStateChangeListener { ButtonBackgroundTracker _backgroundTracker; TextColorSwitcher _textColorSwitcher; float _defaultFontSize; Typeface _defaultTypeface; bool _isDisposed; int _imageHeight = -1; public ButtonRenderer() { AutoPackage = false; } global::Android.Widget.Button NativeButton => Control; …..
  • 31. • internal sealed class ButtonRenderer : AppCompatButton, IVisualElementRenderer, AView.IOnAttachStateChangeListener, AView.IOnFocusChangeListener, IEffectControlProvider, AView.IOnClickListener, AView.IOnTouchListener { public event EventHandler<VisualElementChangedEventArgs> ElementChanged; public event EventHandler<PropertyChangedEventArgs> ElementPropertyChanged; public ButtonRenderer() : base(Forms.Context) { _automationPropertiesProvider = new AutomationPropertiesProvider(this); _effectControlProvider = new EffectControlProvider(this); _textColorSwitcher = new Lazy<TextColorSwitcher>(() => new TextColorSwitcher(TextColors)); Initialize(); } …..
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Layout Lifecycle: Invalidation Loop Has Parent? InvalidateMeasure Called Call InvalidateMeasure on Parent Queue Delay Layout Yes No 1 2 3 4
  • 37. Has Parent? InvalidateMeasure Called Call InvalidateMeasure on Parent Queue Delay Layout Yes No 1 2 3 4 Wait for event callback to happen and trigger the layout mechanism 5 Has Children? LayoutChildren Invoked Layout called 6 7 8 Yes No Layout Cycle Completed 9 Layout Lifecycle: Layout Loop
  • 38. Grid StackLayout ContentView Label Button WebView Grid Label Button Image ScrollView Image Panel Panel Panel LabelRenderer TextBlock ButtonRenderer Button WebViewRenderer WebView Panel LabelRenderer Label ButtonRenderer Button ImageRenderer Image ScrollViewRenderer ImageRenderer Image Forms UWP
  • 39. Grid StackLayout ContentView Label Button WebView Grid Label Button Image ScrollView Image Panel LabelRenderer TextBlock ButtonRenderer Button WebViewRenderer WebView LabelRenderer Label ButtonRenderer Button ImageRenderer Image ScrollViewRenderer ImageRenderer Image Forms UWP+Compression
  • 40. Grid StackLayout ContentView Label Button WebView Grid Label Button Image ScrollView Image Panel LabelRenderer ButtonRenderer WebViewRenderer WebView LabelRenderer ButtonRenderer ImageRenderer ScrollViewRenderer ImageRenderer Forms UWP+Compression+Fast Renderers
  • 41. Pros: less renderers to create, manage and dispose less UI elements on screen Cons: compressed layouts can't have BG colors, gesture recognizers no transformation
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. FlexLayout Example <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x=http://schemas.microsoft.com/winfx/2009/xaml x:Class="FormsFlexLayoutDemo.FlexDemoPage"> <FlexLayout x:Name="flexbox”> <Label Text="Flex Element 1" /> <Label Text="Flex Element 2" /> <Label Text="Flex Element 3" /> <Label Text="Flex Element 4" /> <Label Text="Flex Element 5" /> </FlexLayout> </ContentPage> Flex Element 1 Flex Element 2 Flex Element 3 Flex Element 4 Flex Element 5
  • 49. AlignContent AlignItems Position Overflow Wrap Order AlignSelf Flex JustifyContent IsIncluded Grow Shrink FlexLayout Properties
  • 50.
  • 51. Floating Action Button An Android-only control that has no Xamarin.Forms abstraction.
  • 52. #if to target only the desired platform
  • 54. • Continuously deploy & debug apps Xamarin Live Player
  • 56.
  • 57. Call to action • Get started: xamarin.com/download • Use Xamarin.Forms 2.4.0 today! • Try Page Embedding, Layout Compression today from the Nightly Feed: • https://github.com/xamarin/Xamarin.Forms/wiki/Nightly-Builds
  • 58. Open Source – open.xamarin.com
  • 60. Thank you. Questions? Rui Marinho Software Engineer, Xamarin Forms, Mobile Developer Tools @ruiespinho

Notas del editor

  1. https://github.com/jsuarezruiz/xamarin-forms-goodlooking-UI
  2. Specially xaml and .net platforms
  3. Multiple Teams Multiple Code Bases Expensive & Slow Positive = Great apps delivered to user’s platform Negative = Development hampered by multiple code bases & fragmentation
  4. Inside of a page are layouts A lot of options from something simple like a stack panel to complex and powerful grids
  5. You have more than 40 controls, layouts, and pages to mix and match from. These are all of the controls you have out of the box, you can of course create your own. What is unique is you get the native control and have access to it. Consider an Entry Field On iOS it is mapped to UITextField Android it is EditText Windows Phoen it is a TextBox
  6. Screenshots of app UI tested. Maybe graph the improvement.
  7. Kick off File > New with Live Player running What do we want to cover about building an app?
  8. Listview - get rid xamarin of viewcells.. Add insert methods…
  9. Kick off File > New with Live Player running What do we want to cover about building an app?
  10. Possible embedding in Android or native Obj-C apps Navigate a Native level New Possibilities .. Just bring what you need to iOS or Android
  11. Been working on layout compression for a while Initial testing is showing very positive results Will be a slow burn to get it fully implemented
  12. 2 key parts of the layout lifecycle to know about First is invalidation loop Kicked off whenever a child calls invalidate measure The child will then begin chaining the call up to its parents, over and over This chart is of course an over-simplification and there are optimizations that can prevent this chaining from happening.
  13. Second is the layout loop Occurs some undefined time AFTER the invalidation loop, may be immediate, not required to be Layout is called on a View View then calls Layout on all children, who then recurse into this Completes when all Layout cycles are finished
  14. They are duplicate..
  15. Pros: less renderers to create, manage and dispose less UI elements on screen Cons: compressed layouts can't have BG colors, gesture recognizers no transformation ...
  16. Kick off File > New with Live Player running What do we want to cover about building an app?
  17. https://itunes.apple.com/app/tickers/id1259870423?mt=12
  18. Gtk# is a Graphical User Interface Toolkit for mono and .Net. The project binds the gtk+ toolkit and assorted GNOME libraries, enabling fully native graphical Gnome application development using the Mono and .Net development frameworks
  19. Really beautiful, isn’t it. The talented people over at Samsung have done an incredible job.
  20. Kick off File > New with Live Player running What do we want to cover about building an app?
  21. Kick off File > New with Live Player running What do we want to cover about building an app?
  22. https://github.com/rmarinho/XFNativeMix
  23. https://developer.xamarin.com/guides/xamarin-forms/platform-features/platform-specifics/creating/
  24. CheckableFab is a button implementation from Jeremie Laval https://blog.xamarin.com/embedding-native-controls-into-xamarin-forms/