O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Xamarin 4 By Example

Book Description

Design, develop, and publish your own mobile apps for iOS and Android using C# and Xamarin Studio

About This Book

  • Explore the exciting features of Xamarin Studio while learning to develop your own applications

  • Develop a complete application from conceptualization through to publishing it on the app store

  • The book walks you through the basics of cross-platform development with Xamarin using examples and best practices and tips for cross platform solutions.

  • Who This Book Is For

    If you want to develop your own applications and want to explore the features of Xamarin Studio, then this is the book for you. It is expected that you have a basic understanding of technologies in mobile development, but prior knowledge of Xamarin is not required.

    What You Will Learn

  • Understand the software development lifecycle for mobile applications

  • Use Xamarin Studio and its wide range of features to write your programs in C#

  • Use different options to create multi-platform applications using Xamarin and develop a cross-platform extension method

  • Work with Xamarin forms and various UI controls

  • Integrate synchronous and asynchronous communication module within your app

  • Render images to work with Android and iOS

  • Link a third-party application to your solution

  • In Detail

    The mobile app market is increasing exponentially every year. Xamarin Studio with its modern and powerful IDEs makes creating applications a lot easier by simplifying the development process. Xamarin will allow you and your team to create native applications by taking advantage of one of the most evolved programming language in the world: C#.

    This book will provide you with the basic skills you need to start developing mobile apps using C# and Xamarin. By working through the examples in each chapter, you will gain hands-on experience of creating a complete app that is fully functional by all means. Finally, you will learn to publish the app you created on the app market. Each project in this book will take you one step closer to becoming a professional app developer.

    Style and approach

    The step-by-guide will walk you through the process of creating an application of with the help of small projects that will teach you everything you need to know to build a complete application of your own.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Xamarin 4 By Example
      1. Xamarin 4 By Example
      2. Credits
      3. About the Authors
      4. About the Reviewers
      5. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why subscribe?
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      7. 1. Getting Started with Xamarin
        1. Take off
          1. From Mono to Xamarin
          2. From Xamarin to native
          3. Xamarin cross-platform
          4. What do we need to start?
        2. Xamarin Studio
          1. The editor
            1. The global search
            2. The key bindings
            3. Policies
            4. Code template
            5. Source analysis
            6. Regions and comments
        3. Mobile Development Software Development Lifecycle
          1. Idea
          2. Design
            1. User experience design
            2. User Interface design
          3. Development
          4. Testing
          5. Deployment
            1. Distributing through Apple Connect
            2. Distributing through Google Play
            3. Distributing through Windows Store
          6. Feedback
        4. Summary
      8. 2. Sharing Code between Platforms
        1. Shared Project
          1. Example an extension method to translate text
            1. Idea
            2. Design
            3. Development
        2. Portable Class Library
          1. A multiplatform PCL connectivity plugin
            1. Idea
            2. Development
        3. MVVM pattern a quick overview of theory
        4. MVVM pattern example – split the bill
          1. Idea
          2. Design
          3. Development
            1. The core portable application
        5. Summary
      9. 3. Exploring the UI Controls
        1. The user's point of view
        2. Xamarin.Forms
        3. Rendering Model
        4. The Application class
          1. The Properties dictionary
          2. The MainPage property
        5. Pages
          1. ContentPage
          2. MasterDetailPage
            1. Menu page
            2. Menu item
            3. Content pages
            4. MenuListData
            5. Menu List View
            6. Root page
          3. NavigationPage
            1. Push and Pop
          4. TabbedPage
          5. CarouselPage
        6. Layouts
          1. StackLayout
            1. LayoutOptions
          2. AbsoluteLayout
          3. RelativeLayout
          4. Grid
          5. ContentView
          6. ScrollView
          7. Frame
          1. ActivityIndicator
          2. BoxView
          3. Button
          4. DatePicker
          5. Editor
          6. Entry
          7. Image
          8. Label
          9. ListView
          10. OpenGLView
          11. Picker
          12. ProgressBar
          13. SearchBar
          14. Slider
          15. Stepper
          16. Switch
          17. TableView
          18. TimePicker
          19. WebView
        8. Cells
          1. Pop-ups
          2. Gestures
          3. Fonts
          4. Colors
        9. Summary
      10. 4. Data – the Monkeys Catalog
        1. Mobile architectural pattern
          1. Presentation, business, and data layers
        2. Inside the layers
        3. The Monkeys catalog
          1. Base folders
            1. Base entities
            2. Base data layer
              1. Create
              2. Read
              3. Update
              4. Delete
            3. Base business layer
          2. Core folder
            1. Core entities
            2. Core data layer
            3. Core business layer
          3. Presentation
          4. Summary
      11. 5. Cloud and Async Communication
        1. Communication
          1. Data, format, and channel
          2. Sync and async communication
        2. Example project - Xamarin Fast Food
          1. Service layer
          2. Presentation Layer
        3. Services
          1. Web Service Description Language
          2. RESTful APIs
            1. How to request data
            2. Parameters needed in the data request
            3. Structure of data in response
            4. Error messages to display
        4. Example project Weather
          1. Data model
          2. Service layer
          3. Presentation layer
        5. Ideas
        6. Summary
      12. 6. Custom Renderers
        1. Rendering model
          1. Custom renderers
          2. Rounded image example
        2. App linking example
        3. Summary
      13. 7. Monkey Puzzle Game – Processing Images
        1. Monkey Puzzle Game
          1. Starting up – the first prototype
          2. Loading images from the Web
          3. Taking pictures and loading an image from the gallery
        2. Summary
      14. 8. The People Around Me Application
        1. What is People Around Me doing?
          1. Installing Windows 10
          2. Downloading Windows 10
          3. Installing Windows 10 via BootCamp
          4. Installing Visual Studio 2015
          5. Installing Xamarin
        2. Creating the project
          1. Checking the Android SDK installations
          2. Check Android virtual devices installation
        3. Summary
      15. 9. Testing – Spot the bugs
        1. Debugging a Xamarin project
          1. Creating a sample project
          2. Setting a breakpoint
          3. Starting a debug session
          4. Usage of log panels
            1. Application output window
            2. Android device log
        2. Xamarin Profiler
          1. Launching the Profiler
        3. The Xamarin.UITest framework
          1. Creating a sample UITest project
        4. Summary
      16. 10. Publishing to the Market
        1. What is store?
        2. Publishing to the Apple App Store
          1. Apple Developer Portal steps
          2. Visual Studio steps
        3. Publishing to the Google Play Store
          1. Preparing Project to Compile
          2. Creating a package
          3. Publishing an application on the Google Play Store
        4. Publishing to the Windows Store
        5. Summary