Creating Cross-platform C# Applications with Uno

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Discover how to leverage the Uno Platform to write single-codebase, cross-platform mobile, desktop, and web applications using C# and XAML

Key Features

  • Enhance your Windows apps by running them on all operating systems and browsers
  • Use tools and APIs you already know to remain productive as you target new platforms
  • Create realistic apps for various lines of business (LOBs) and consumer scenarios

Book Description

Developers are increasingly being asked to build native applications that run on multiple operating systems and in the browser. In the past, this would have meant learning new technologies and making multiple copies of an application. But the Uno Platform allows you to use tools, languages, and APIs you already know from building Windows apps to develop apps that can also run on other platforms. This book will help you to create customer-facing as well as line-of-business apps that can be used on the device, browser, or operating system of your choice.

This practical guide enables developers to put their C# and XAML knowledge to work by writing cross-platform apps using the Uno Platform. Packed with tips and practical examples, this book will help you to build applications for common scenarios. You'll begin by learning about the Uno Platform through step-by-step explanations of essential concepts, before moving on to creating cross-platform apps for different lines of business. Throughout this book, you'll work with examples that will teach you how to combine your existing knowledge to manage common development environments and implement frequently needed functionality.

By the end of this Uno development book, you will have learned how to write your own cross-platform apps with the Uno Platform and use additional tools and libraries to speed up your app development process.

What you will learn

  • Understand how and why Uno could be the right fit for your needs
  • Set up your development environment for cross-platform app development with the Uno Platform and create your first Uno Platform app
  • Find out how to create apps for different business scenarios
  • Discover how to combine technologies and controls to accelerate development
  • Go beyond the basics and create 'world-ready' applications
  • Gain the confidence and experience to use Uno in your own projects

Who this book is for

This book is for developers who are familiar with app development for Windows and want to use their existing skills to build cross-platform apps. Basic knowledge of C# and XAML is required to get started with this book. Anyone with basic experience in app development using WPF, UWP, or WinUI will be able to learn how to create cross-platform applications with the Uno Platform.

Table of Contents

  1. Introducing Uno Platform
  2. Writing Your First Uno Platform App
  3. Working with Forms and Data
  4. Mobilizing Your App
  5. Making Your App Ready for the Real World
  6. Displaying Data in Charts and with Custom 2D Graphics
  7. Testing Your Apps
  8. Deploying Your Apps and Going Further

Author(s): Matt Lacey, Marcel Alexander Wagner
Publisher: Packt Publishing
Year: 2021

Language: English
Commentary: True PDF
Pages: 258

Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Section 1: Getting to Know Uno Platform
Chapter 1: Introducing Uno Platform
Technical requirements
Understanding what Uno Platform is
A brief history of Uno Platform
How Uno Platform works
Is it a panacea?
Using Uno Platform
Uno Platform allows you to use what you already know
Uno Platform supports many platforms
Can Uno Platform do everything that your app requires?
How does Uno Platform compare to the alternatives?
Setting up your development environment
Developing with Visual Studio
Using other editors and IDEs
Checking your setup
Debugging your setup
Summary
Further reading
Chapter 2: Writing Your First Uno Platform App
Technical requirements
Creating your first app
Creating your project with the Uno Platform solution templates
Creating your project with the .NET CLI
Project structure and the heads
Building and running your first Uno Platform app
Running and debugging your app with Visual Studio on Windows
Running and debugging your apps with Visual Studio for Mac
Debugging the WASM head of your app
XAML Hot Reload and C# Edit and Continue
Platform-specific XAML and C#
Platform-specific C#
Platform-specific XAML
Going beyond the default cross-platform app structure
The multi-platform library project type
Other project types
Summary
Section 2: Writing and Developing Uno Platform Apps
Chapter 3: Working with Forms and Data
Technical requirements
Introducing the app
Creating the app
Entering and validating data
Using Windows Community Toolkit controls
Displaying data using DataGrid
Displaying data with the DataGrid control
Exporting issues in PDF format
Exporting on desktop
Exporting on the web with a download link
Summary
Chapter 4: Mobilizing Your App
Technical requirements
Introducing the app
Creating the app
Creating the main page
Showing upcoming arrival details
Retrieving remote data
Connecting to a remote data source
Using Polly to handle exceptions and retry requests
Making your app look like it belongs on each platform
Applying Material styles to the Android version of the app
Applying Cupertino styles to the iOS version of the app
Accessing device capabilities
Summary
Chapter 5: Making Your App Ready for the Real World
Technical requirements
Introducing the app
Creating the app
Creating the main navigation and booking process
Persisting data locally using the ApplicationData API and SQLite
Storing data using the ApplicationData API
Using SQLite to store data
Loading data from SQLite
Making your app ready for customers
Localizing your app
Customizing your app's appearance
Ensuring everyone can use your app
Summary
Chapter 6: Displaying Data in Charts and with Custom 2D Graphics
Technical requirements
Introducing the app
Creating the app
Creating the individual pages
Creating the main page
Displaying charts with controls from SyncFusion
Updating references to include the SyncFusion controls
Drawing a line chart
Displaying charts with controls from Infragistics
Updating references
Drawing a column chart
Drawing custom graphics with SkiaSharp
Updating project references
Drawing the network map
Responding to changes in the UI
Changing the page layout
Stretching and scaling content to fit the available space
Summary
Section 3: Test, Deploy, and Contribute
Chapter 7: Testing Your Apps
Technical requirements
Getting started with Uno.UITest
Writing and running your first test
How Uno.UITest works
Authoring your first test
Running your tests on Android, iOS, and WASM
Writing more complex tests
Test tools beside Uno.UITest
Testing the UWP head of your app with WinAppDriver
Writing unit tests for your Uno Platform app
Performing manual testing and why it is important
Summary
Chapter 8: Deploying Your Apps and Going Further
Technical requirements
Bringing Xamarin.Forms apps to WebAssembly
Deploying a Wasm Uno Platform app to the web
Automating build, tests, and distribution
Deploying your app to a store
Engaging with the Uno Platform community
Sources of information
Sources of help
Contributing
Summary
Other Books You May Enjoy
Index