Table of Contents

Preface

Section 1: Basic Concepts

Chapter 1: Getting Started with the Windows App SDK and WinUI

Technical requirements

A brief history of Windows UI platforms

Introducing the Windows App SDK and WinUI 3.0

The role of the new .NET runtime

Exploring the Windows App SDK

Choosing the right deployment model

Managing the dependency with the Windows App SDK

Packaged apps

Unpackaged apps

Upgrading the Windows App SDK runtime

Creating the first Windows App SDK project

A new packaged WinUI C# application

Using a separate packaging project

A new unpackaged WinUI application

Adding support to an existing application

Building libraries and components

Using a WinUI class library

Using a .NET class library

Summary

Questions

Further reading

Section 2: Modernization Journey

Chapter 2: The Windows App SDK for a Windows Forms Developer

Technical requirements

Introducing XAML

Using namespaces

Customizing controls with properties

Reacting to changes with event handlers

Styling your applications with resources

Sharing a resource with a whole application

Using dictionaries to organize resources

Reusing multiple resources with styles

Understanding animations

Playing an animation

Customizing the template of a control

Using a Universal Windows Platform project

Using the XAML source code

Managing the states of a control

Data binding

Binding with C# objects

Implementing the INotifyPropertyChanged interface

Displaying collections of data with DataTemplates

Creating user controls

Summary

Questions

Chapter 3: The Windows App SDK for a WPF Developer

Technical requirements

Importing XAML namespaces

Binding with x:Bind

Different context

Default binding mode

Using x:Bind to define a DataTemplate

Event binding

Functions

Using the dispatcher

Improving dispatcher usage in asynchronous scenarios

Localizing your applications

Translating the user interface

Handling translation in code

A better way to manage localization

Support localization in a packaged app

Summary

Questions

Chapter 4: The Windows App SDK for a UWP Developer

Technical requirements

Moving to a new namespace

Working with the UI thread

Controlling the application's life cycle

Supporting the application's activation

Supporting multiple activation paths

Application instancing

Supporting advanced redirection scenarios

Managing the application's window

Using the AppWindow class

Performing operations in the background

Summary

Questions

Chapter 5: Designing Your Application

Technical requirements

Creating a responsive layout

Using effective pixels

Adapting the UI

Using the right controls to build a responsive layout

Supporting navigation

Implementing the NavigationMenu control

Handling the navigation

Supporting the page's life cycle

Supporting page transitions

Managing backward navigation

Adding sections to the footer

Displaying a menu at the top

Supporting Windows themes

Forcing a specific theme

Creating animations

Creating animations in C#

Creating animations in XAML

Applying effects and animating them

Connected animations

Using a connected animation in a master-detail scenario

Using animated icons

Exploring the WinUI controls

Summary

Questions

Chapter 6: Building a Future-Proof Architecture

Technical requirements

Learning the basic concepts of the MVVM pattern

Moving a bit deeper into the MVVM pattern

Exploring frameworks and libraries

Supporting actions with commands

Enabling or disabling a command

Making your application easier to evolve

Exchanging messages between different classes

Managing navigation with the MVVM pattern

Navigating to another page

Passing parameters from a ViewModel to another

Summary

Questions

Section 3: Integrating Your App with the Windows Ecosystem

Chapter 7: Migrating Your Windows Applications to the Windows App SDK and WinUI

Technical requirements

Getting an understanding of general migration guidance

Exploring the sample application

Updating your applications to .NET 6

The .NET Portability Analyzer

Upgrading your solution

Migrating a Windows Forms application

Supporting navigation

Migrating from the code-behind approach to the MVVM pattern

Migrating the DataGrid control

Migrating the Details page

Migrating a WPF application

Themes

Migrating a UWP app

Migrating the dispatcher

Activation

Managing the life cycle

Summary

Questions

Chapter 8: Integrating Your Application with the Windows Ecosystem

Technical requirements

Integrating APIs from the Universal Windows Platform

Taking advantage of the Bing Maps service

Introducing biometric authentication

Working with files and folders

Working with folders

Working with files

Using the local storage in packaged apps

Using local storage to store settings

Working with file pickers

Supporting the sharing contract

Building the source app

Building the target app

Integrating web experiences in your desktop application

Adding the WebView2 control to your page

Enabling interactions between the native and web layers

Distributing the WebView2 runtime with your applications

Summary

Questions

Chapter 9: Implementing Notifications

Technical requirements

Sending a notification from a Windows application

Working with toast notifications

Supporting toast notifications in packaged apps

Adding images

Customizing the application's name and the timestamp

Tagging a toast notification

Scheduling a notification

Adding interaction to a notification

Handling activation from a notification

Supporting user input

Displaying a progress bar

Displaying a badge in the taskbar

Implementing push notifications

Implementing the backend

Limitations of the current implementation

Summary

Questions

Chapter 10: Infusing Your Apps with Machine Learning Using WinML

Technical requirements

A brief introduction to ONNX and WinML

Evaluating an ONNX model with WinML

Loading the ONNX model

Loading the labels

Preparing the model input

Performing the evaluation

Sorting the results

Putting everything together

Training and using your own machine learning model

Training the model

Testing the model

Exporting the model

Summary

Questions

Section 4: Distributing Your Application

Chapter 11: Publishing Your Application

Understanding the MSIX packaging technology

Built-in optimizations around network bandwidth and disk space

Deployment flexibility

Tamper protection and signature enforcement

Registry virtualization

Local application data virtualization

The Virtual File System (VFS)

MSIX limitations

The anatomy of an MSIX package

Creating and signing an MSIX package

Choosing a distribution method

Choosing a signing method

Selecting and configuring packages

Signing an MSIX package

Publishing your application to Microsoft Store

Submitting an MSIX packaged application

Submitting an unpackaged application

The certification process

Submitting updates

Deploying your applications from a website using AppInstaller

Generating an AppInstaller file with Visual Studio

Generating an AppInstaller file with AppInstaller File Builder

Deploying an AppInstaller file

Updating an application automatically

Updating an application from code

Supporting updates and repairs

Publishing your application to the Windows Package Manager repository

Creating a manifest for Windows Package Manager

Summary

Questions

Chapter 12: Enabling CI/CD for Your Windows Applications

Technical requirements

Introducing CI/CD pipelines

Building a Windows application in a CI/CD pipeline

Pulling the source code

Adding MSBuild to the system's path

Building the Windows application

Publishing the artifact

Testing the workflow

Supporting versioning

Installing the tool and generating the version number

Setting the version number

Handling signing

Storing the certificate on GitHub

Automating the deployment

Generating the App Installer file

Deploying our Windows application

Improving the deployment story

Summary

Questions

Further reading

Assessments

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

Chapter 10

Chapter 11

Chapter 12

Why subscribe?

Other Books You May Enjoy

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.156.93