22
#VirtualXamarin

How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Embed Size (px)

Citation preview

Page 1: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Page 2: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

• Questions All lines are muted, so post your questions in the chat console for Q&A at the end.

• IssuesIf you lose your internet connection, reconnect using the link emailed to you.

If you lose your phone connection, re-dial the phone number and re-join.

For more support: Call ReadyTalk Support at (800) 843-9166

• FeedbackLet us know what you thought about our presentation in our post-webinar survey!

• SlidesThe presentation will be sent to the email you registered with. We will also post the

slides on our SlideShare account. Find them at @VirtualXamarin

• Socialize Use the #VirtualXamarin hashtag to participate on social media

#VirtualXamarin

Using ReadyTalk

Page 3: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Thank you to our

sponsors!

#VirtualXamarin

Page 4: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

How To Make A Killer App With Custom Control Rendering In Xamarin Forms

Pranav Khandelwal (PK)

#VirtualXamarin

Page 5: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

My Background

PK

• Engineering @ Georgia Tech

• Software Engineer – Mobile @ Bluetube

• Xamarin Certified Mobile Developer•

#VirtualXamarin

Page 6: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Who Is Bluetube

• Established in 1999

• Award-Winning Solutions

• Experts with Technology and Usability

• Enterprise Corporations & Non-profit Clients

• Premier Xamarin Consulting Partner

• Xamarin Test Cloud Consulting Partners

Bluetube designs and

builds enterprise mobile

apps & responsive

websites.

Page 7: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Xamarin Forms

• Cross-platform UI Code

• Native user-interfaces

• Native SDK access when you need it

#VirtualXamarin

Page 8: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Renderers

• Renderer Class – Used to render page, layout,

or control

• Can be extended with your own

implementation

#VirtualXamarin

Page 9: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Code Examples

• Customizing an existing control

• Customizing pages

• Gesture-based Interaction

Page 10: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Customizing Existing Controls

DEMO

#VirtualXamarin

Page 11: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Customizing Existing Controls

• Create subclass of existing control

• Add additional properties

• Create custom renderer in platform-specific

projects

• Associate renderer to custom controls

Page 12: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Creating New Controls

• Create subclass of View

• Add additional properties

• Create renderer deriving from

ViewRenderer<TView, TNativeView>

• Handle any property changes

Page 13: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Customizing Pages

DEMO

Page 14: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Customizing Pages

• Create subclass of a Page

• Create renderer deriving from PageRenderer

• Access model data through

OnElementChanged

Page 15: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Gesture Based Interaction

DEMO

Page 16: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Gesture Based Interaction

• Create subclass of a Control

• Add methods to handle gestures to custom

control – call OnPropertyChanged()

• Create custom renderer

• Implement platform specific gesture handlers

in renderer

• Call custom control gestures handlers from

renderer

Page 17: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Recap

Use custom renders to:

• Add functionality to existing controls

• Create brand new controls

• Customize pages

• Handle gesture based interaction

Page 18: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

#VirtualXamarin

Referenceshttp://blog.xamarin.com/using-custom-controls-in-

xamarin.forms-on-android/

http://www.xforms-kickstarter.com/

http://blog.xamarin.com/using-custom-uiviewcontrollers-in-

xamarin.forms-on-ios/

http://developer.xamarin.com/guides/cross-platform/xamarin-

forms/custom-renderer/

Page 19: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Questions

?

#VirtualXamarin

Page 20: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Next Presentation Wednesday, June 10

12-1pm EST

virtualusersgroup.org/xamarin

#VirtualXamarin

Page 21: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

@VirtualXamarin

Page 22: How To Make A Killer App With Custom Control Rendering in Xamarin Forms

Thank you to our

sponsors!

#VirtualXamarin