OiiPDF.com

Building Xamarin.Forms Mobile Apps Using XAML

Title Building Xamarin.Forms Mobile Apps Using XAML
Author Dan Hermes, Nima Mazloumi
Sub Title Mobile Cross-Platform XAML and Xamarin.Forms Fundamentals
ISBN 1484240294
Year 2019
Pages 426
File Formate PDF
Tags Programming

Book Description

Leverage Xamarin.Forms to build iOS and Android apps using a single, cross-platform approach. This book is the XAML companion to the C# guide Xamarin Mobile Application Development.
You’ll begin with an overview of Xamarin.Forms, then move on to an in-depth XAML (eXtensible Application Markup Language) primer covering syntax, namespaces, markup extensions, constructors, and the XAML standard. XAML gives us both the power of decoupled UI development and the direct use of Xamarin.Forms elements. This book explores the core of the Xamarin.Forms mobile app UI: using layouts and FlexLayouts to position controls and views to design and build screens, formatting your UI using resource dictionaries, styles, themes and CSS, then coding user interactions with behaviors, commands, and triggers.
You’ll see how to use XAML to build sophisticated, robust cross-platform mobile apps and help your user get around your app using Xamarin.Forms navigation patterns. Building Xamarin.Forms Mobile Apps Using XAML explains how to bind UI to data models using data binding and using the MVVM pattern, and how to customize UI elements for each platform using industry-standard menus, effects, custom renderers, and native view declaration.
XAML and C# developers, architects, and technical managers as well as many Android and iOS developers

Table Of Content

  • Table of Contents
  • Foreword
  • About the Authors
  • About the Technical Reviewer
  • Acknowledgments
  • Introduction
  • Chapter 1: Building Apps Using Xamarin
    • Understanding Xamarin.Forms
    • XAML vs. C#
    • Xamarin.Forms Solution Architecture
    • Understanding the Platform-Specific UI Approach
    • Platform-Specific UI Solution Architecture
    • Choosing Xamarin.Forms or a Platform-Specific UI
    • Using Custom Renderers, Effects, and Native Views
    • Exploring the Elements of Mobile UIs
    • Using the Xamarin.Forms UI
    • Page
    • Layout
    • View
    • Creating a Xamarin.Forms Solution
    • Xamarin.Forms Project
    • Application Lifecycle Methods: OnStart, OnSleep, and OnResume
    • Building Pages Using ContentPage
    • Xamarin.Android
    • Xamarin.iOS
    • Core Library
    • Setting the App’s Main Page
    • Adding Xamarin.Forms Views
    • Label View
    • Placing Views Using StackLayout
    • Background Color and Font Color
    • Using Fonts
    • Using Platform-Specific Fonts
    • Button View
    • Setting View Alignment and Size: HorizontalOptions and VerticalOptions
    • Justification with LayoutOptions
    • AndExpand Pads with Space
    • Entry View for Text Input
    • BoxView
    • Image View
    • Local Images
    • Image Sizing: Aspect Property
    • Making an Image Clickable with a GestureRecognizer
    • ScrollView
    • Padding Around the Entire Page
    • CODE COMPLETE: Adding Xamarin.Forms Views
    • Summary
  • Chapter 2: Building Xamarin.Forms Apps Using XAML
    • Basic Syntax
    • XML Syntax
    • Element
    • Attribute
    • Hierarchy
    • XML Namespaces
    • XAML Syntax
    • Classes and Members
    • XAML Namespaces
    • Markup Extensions
    • Static
    • Array
    • CODE COMPLETE: Array Markup Extension
    • Type
    • Reference
    • CODE COMPLETE: Reference Markup Extension
    • Constructors
    • Default Constructor
    • Non-default Constructor
    • Factory Method
    • CODE COMPLETE: XAML Constructors
    • XAML Terms
    • Xamarin.Forms Syntax
    • Property Element Syntax
    • Content Property Syntax
    • Enumeration Value Syntax
    • Event Handler Syntax
    • Collection Syntax
    • Attached Property Syntax
    • CODE COMPLETE: Setting Property Values
    • Anatomy of XAML Files
    • XAML Compilation
    • XAML Standard
    • Summary
  • Chapter 3: UI Design Using Layouts
    • Xamarin.Forms Layouts
    • Using Xamarin.Forms Layouts
    • StackLayout
    • Padding Around the Entire Layout
    • Stacking with Vertical Orientation
    • Stacking with Horizontal Orientation
    • Nesting Layouts
    • Expanding and Padding Views by Using LayoutOptions
    • CODE COMPLETE: StackLayout
    • FlexLayout
    • Position Views Using Axes
    • FlexLayout Patterns
    • Grid
    • Sizing Rows and Columns
    • Sizing to Fit Views
    • Setting Exact Size
    • Expanding Views to Fit Available Space
    • Expanding Views Proportionally
    • Creating Multicell Views
    • Spanning Columns
    • Spanning Rows
    • Padding Between Cells
    • CODE COMPLETE: Grid
    • RelativeLayout
    • Setting View Location and Size
    • Using Constraints
    • Absolute Location and Size
    • RelativeToParent Constraint
    • RelativeToView Constraint
    • CODE COMPLETE: RelativeLayout
    • AbsoluteLayout
    • Creating Bounding Objects with SetLayoutBounds
    • Setting Location and Size by Using Rectangles
    • Setting Location by Using Points
    • Binding Location
    • Binding Size
    • Binding Both Location and Size
    • CODE COMPLETE: AbsoluteLayout
    • ContentView
    • CODE COMPLETE: ContentView
    • Frame
    • Understanding Custom Controls
    • Summary
  • Chapter 4: Styles, Themes, and CSS
    • Creating a Page Without Style
    • Styling Manually Using View Formatting Properties
    • CODE COMPLETE: Feedback Page Using View Formatting Properties
    • Resources and Dictionaries
    • Defining Resources
    • Static Resource Lookup
    • CODE COMPLETE: Feedback Page Using Static Resources
    • Dynamic Resource Lookup
    • CODE COMPLETE: Feedback Page Using Dynamic Resources
    • Reusable Resource Dictionaries
    • Global Resource Dictionary
    • Lookup Behavior
    • Overriding Resources
    • Merging Dictionaries
    • Styles
    • Style Lookup
    • Explicit Styles
    • CODE COMPLETE: Using Explicit Styles
    • Implicit Styles
    • CODE COMPLETE: Using Implicit Styles
    • Overriding Styles
    • CODE COMPLETE: Overriding Styles
    • Using Resources in Styles
    • CODE COMPLETE: Using Resources in Styles
    • Style Inheritance
    • Static Style Inheritance
    • Dynamic Style Inheritance
    • Styles Overview
    • CODE COMPLETE: Defining Styles
    • CODE COMPLETE: Applying Styles
    • Device Styles
    • CODE COMPLETE: Using Device Styles
    • Themes
    • Using Themes
    • Theme Styling Options
    • Dark Theme
    • Light Theme
    • Custom Themes
    • Customizing the Dark Theme
    • CODE COMPLETE: Customizing the Dark Theme
    • Cascading Style Sheets (CSS)
    • Selectors
    • Using CSS
    • CODE COMPLETE: Using CSS
    • Xamarin.Forms CSS Definition
    • Summary
  • Chapter 5: User Interaction Using Controls
    • Xamarin.Forms Views
    • Picker
    • DatePicker
    • TimePicker
    • Stepper
    • Slider
    • Switch
    • Scale, Rotation, Opacity, Visibility, and Focus
    • CODE COMPLETE: Xamarin.Forms Views
    • Custom Controls
    • Control Templates
    • Commands
    • CommandParameters
    • Triggers
    • TargetType
    • Property Trigger
    • Data Trigger
    • Multi Trigger
    • Event Trigger
    • CODE COMPLETE: Triggers
    • Behaviors
    • Attached Properties
    • Behavior
    • Summary
  • Chapter 6: Making a Scrollable List
    • Xamarin.Forms ListView
    • Binding to a List of Strings
    • Selecting an Item
    • Binding to a Data Model
    • CODE COMPLETE: Binding to a Data Model
    • Adding an Image
    • Customizing List Rows
    • CODE COMPLETE: Customizing List Rows
    • Adding Buttons
    • Using Button Views
    • Using Context Actions
    • Grouping Headers
    • Customizing the Group Header
    • Creating a Jump List
    • ListViews Scroll Automatically
    • Pull-to-Refresh
    • Optimizing Performance
    • ListView Caching
    • ListView Optimization
    • Summary
  • Chapter 7: Navigation
    • Navigation Patterns
    • Hierarchical
    • Modal
    • State Management
    • Xamarin.Forms Navigation
    • Hierarchical Navigation Using NavigationPage
    • Pushing and Popping Screens on the Navigation Stack
    • Setting the Page Title
    • Customizing the Navigation Bar
    • Handling the Back Button
    • Creating a Drop-Down Menu
    • Modal
    • Full-Page Modal Using NavigationPage
    • User Notification Using Alerts
    • Pop-Up Menu Using Action Sheets
    • Managing State
    • Passing Data into Page Parameters
    • Disk Persistence Using the Properties Dictionary
    • Using a Static Global Class
    • Using a Static Property on the Application Object
    • Drill-Down Lists
    • Using ListView by Item
    • CODE COMPLETE: Drill-Down List
    • Using ListView by Page
    • Using TableView for Grouping Pages
    • Navigation Drawer Using MasterDetailPage
    • Tabs Using TabbedPage
    • Creating Data-Bound Tabs
    • Putting NavigationPages Inside a TabbedPage
    • Springboard
    • Making Icons Tappable by Using Gesture Recognizers
    • Carousel Using CarouselPage
    • Summary
  • Chapter 8: Custom Renderers, Effects, and Native Views
    • Custom Renderer
    • When to Use a Custom Renderer
    • Creating and Using a Custom Renderer
    • Creating the Custom Element
    • Creating the Custom Renderer
    • Android Custom Renderer
    • CODE COMPLETE: Android Custom Renderer
    • iOS Custom Renderer
    • CODE COMPLETE: iOS Custom Renderer
    • Which Renderer and View Do You Customize?
    • Effects
    • Creating and Using Effects
    • PlatformEffect
    • RoutingEffect
    • Using the Effect
    • Text Validator Effect
    • Android Platform Effect
    • iOS Platform Effect
    • Handling Events
    • CODE COMPLETE: TextValidatorEffect
    • Adding Effects via Attached Properties
    • Native Views
    • CODE COMPLETE: Native View Declaration
    • Using Factory Methods
    • CODE COMPLETE: Non-Default Constructors and Factory Methods
    • Summary
  • Chapter 9: Data Access with SQLite and Data Binding
    • What Is SQLite?
    • What Is SQLite.NET?
    • Data Binding
    • Xamarin.Forms Data Binding
    • Binding to a Data Model
    • Using INotifyPropertyChanged
    • CODE COMPLETE: Using INotifyPropertyChanged
    • Understanding ViewModels and MVVM
    • Binding to ViewModels and Data Models
    • Create a ViewModel That Implements INotifyPropertyChanged
    • Implement INotifyPropertyChanged in Your Data Model
    • Binding a Read-Only ListView
    • Binding an Editable ListView
    • Adding and Deleting Rows
    • Editing Properties
    • Binding to a View Model
    • CODE COMPLETE: Binding an Editable ListView
    • Binding a View to Another View
    • String Formatting
    • Value Converter
    • Using SQLite.NET
    • Locking Is Key
    • Creating a Database
    • Building the Database Path
    • Connect by Using Shared Projects
    • Connect by Using .NET Standard
    • Connect in Android
    • Connect in iOS
    • Creating a Table
    • Using Attributes
    • Inserting and Deleting Rows
    • Getting Rows
    • Updating Rows
    • Locking Rows
    • Creating the Data Access Layer
    • Creating a Repository
    • Managing the Repository
    • Adding Methods to the Repository
    • CODE COMPLETE: Creating a DAL by Using SQLite.NET
    • Database Creation Options
    • Web Services
    • Enterprise Cloud Data Solutions
    • Microsoft Azure Mobile Apps
    • Cloud Storage
    • Offline Data Sync
    • Authentication
    • Push Notifications
    • Visual Studio App Center (VSAC)
    • IBM Mobile Foundation
    • Summary
  • Index