Creating Mobile Apps with Xamarin.Forms

Creating Mobile Apps with Xamarin.Forms

PREVIEW EDITION This excerpt provides early content from a book currently in development and is still in draft format. See additional notice below. PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2014 Xamarin, Inc. All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. ISBN: 978-0-7356-9725-6 Microsoft Press books are available through booksellers and distributors worldwide. Please tell us what you think of this book at http://aka.ms/tellpress. This document is provided for informational purposes only and Microsoft makes no warranties, either express or implied, in this document. Information in this document, including URL and other Internet website references, is subject to change without notice. The entire risk of the use or the results from the use of this document remains with the user. This ERRNH[SUHVVHVWKHDXWKRU·s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/ Trademarks/EN- US.aspx are trademarks of the Microsoft group of companies. All other marks are property of their respective owners. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. This ERRNH[SUHVVHVWKHDXWKRU·s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Acquisitions and Project Editor: Devon Musgrave Cover illustration: Serena Zhang Table of contents Introduction .............................................................................................................. 7 Who should read this book .......................................................................................................................................................... 7 Assumptions ................................................................................................................................................................................. 7 Organization of this book ............................................................................................................................................................. 7 Conventions and features in this book..................................................................................................................................... 8 System requirements ...................................................................................................................................................................... 8 Downloads: Code samples ............................................................................................................................................................ 9 Updating the code samples ................................................................................................................................................... 9 Acknowledgments ..........................................................................................................................................................................10 Free ebooks from Microsoft Press ............................................................................................................................................10 We want to hear from you .........................................................................................................................................................10 Chapter 1 How does Xamarin.Forms fit in?......................................... 11 Cross-platform mobile development ......................................................................................................................................12 The mobile landscape ............................................................................................................................................................12 Problem 1: Different user-interface paradigms ...........................................................................................................12 Problem 2: Different development environments ......................................................................................................13 Problem 3: Different programming interfaces .............................................................................................................13 Problem 4: Different programming languages ............................................................................................................13 The C# and .NET solution ...........................................................................................................................................................14 A single language for all platforms ...................................................................................................................................15 Sharing code ..............................................................................................................................................................................16 Introducing Xamarin.Forms .......................................................................................................................................................18 The Xamarin.Forms option ...................................................................................................................................................18 XAML support ............................................................................................................................................................................20 Platform specificity ..................................................................................................................................................................22 2 A cross-platform panacea? ..................................................................................................................................................23 Your development environment ...............................................................................................................................................23 Machines and IDEs ..................................................................................................................................................................24 Devices and emulators...........................................................................................................................................................24 Installation ........................................................................................................................................................................................25 Creating an iOS app................................................................................................................................................................25 Creating an Android app ......................................................................................................................................................26 Creating a Windows Phone app ........................................................................................................................................26 All ready? .....................................................................................................................................................................................26 Chapter 2 Pages, layouts, and views ......................................................27 Say hello ............................................................................................................................................................................................28 Anatomy of a Xamarin.Forms solution ................................................................................................................................. 30 The iOS project .........................................................................................................................................................................32 The Android project ................................................................................................................................................................33 The Windows Phone project ...............................................................................................................................................34

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    73 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us