Windows 10 Development with XAML and C# 7. 2 Ed

Windows 10 Development with XAML and C# 7. 2 Ed

Windows 10 Development with XAML and C# 7. 2 Ed
Автор: Galloway Jon, Hartwell Jonathan, Japikse Philip, Liberty Jesse
Дата выхода: 2018
Издательство: Apress Media, LLC.
Количество страниц: 233
Размер файла: 2.0 MB
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы

Table of Contents....5

About the Authors....10

About the Technical Reviewer....12

Chapter 1: Getting Started....13

Background....13

Versionless Windows 10....14

The Microsoft Store....14

Windows Design Guidelines....14

Being Fast and Fluid....15

Sizing Beautifully....16

Using the Right Contracts....16

Investing in a Great Tile....16

Feeling like It Is Connected and Alive....16

Roaming to the Cloud....17

UX Guidelines....17

Tooling....17

Visual Studio 2017....17

Versions....18

Visual Studio Community Edition....18

Visual Studio with MSDN....18

The Windows 10 Simulator....18

Creating Your First Windows 10 UWP App....19

Adding a Basic Page....22

The Simulator Controls....24

Blend for Visual Studio 2017....26

Opening Your Project in Blend for Visual Studio....27

Projects, Assets, States, and Data Tabs....28

Objects and Timeline....29

Page Designer, Markup, and Code....29

Properties, Resources, and Data Tabs....29

Git....30

Using Git in Visual Studio....31

GitHub for Windows....31

Enabling Git in Visual Studio 2017....32

Checking In Changes....34

Remote Repositories....35

Reverting Changes....35

NuGet....36

Installing Your First Package....37

Installing from the Command Line....37

Installing from the Graphical User Interface GUI....38

Summary....39

Chapter 2: Building Your First Windows 10 UWP App....40

Creating Your First App....40

App Project Overview....41

Properties....44

References....44

Assets....44

App1_TemporaryKey.pfx....45

Package.appxmanifest....45

The Application Tab....46

The Visual Assets Tab....47

The Capabilities Tab....48

The Declarations Tab....49

The Content URIs Tab....49

The Packaging Tab....49

App.xaml....50

MainPage.xaml....50

Model View ViewModel (MVVM)....51

The Pattern....51

Model....51

View....51

ViewModel....52

Creating a Model....52

Adding Customer Properties....53

INotifyPropertyChanged....55

Creating the ViewModel....58

Updating the Code-Behind....60

Creating the View....60

Testing the App....62

Guidance....63

Navigation....63

Creating a New Page....64

Creating the UI....65

Adding Navigation to the MainPage....66

Handling the NavigatedTo Event....69

The Back Button....69

Summary....70

Chapter 3: Themes, Panels, and Controls....71

Choosing a Theme....71

Using Panels....74

The Canvas Control....75

The Grid Control....79

Defining Rows and Columns....79

Alignment, Margins, and Padding....82

The StackPanel Control....84

The RelativePanel Control....86

The Border Control....87

Working with Controls ....88

TextBlock and TextBox....89

Spell Check....92

Headers and Watermarks Controls....96

The PasswordBox Control....99

Buttons and Event Handlers Controls....100

The HyperLinkButton Control....104

The CheckBoxes, ToggleSwitches, and RadioButtons Controls....105

The ListBox, ListView, and ComboBox Controls....108

The Image Control....111

The Slider Control....114

The ProgressBar Control....114

The ToolTip Control....116

The DatePickers and TimePickers Controls....116

Flyouts....118

Basic Flyouts....119

Menu Flyouts....120

Understanding Dependency Properties....121

Data Hiding....121

Dependency Properties....123

Summary....127

Chapter 4: Binding....128

DataContext....129

Creating a Simple Binding....129

Data-Binding Statements....132

Binding Errors....134

FallbackValue....135

TargetNullValue....136

Binding to Elements....136

Binding Modes....139

UpdateSourceTrigger....140

INotifyPropertyChanged....141

Binding to Collections....145

Creating the Collection....145

Creating a Data-Bound ListView....150

INotifyCollectionChanged....152

Data Converters....153

Summary....158

Chapter 5: Local Data....159

Application Data....159

Settings Containers....160

Saving, Reading, and Deleting Local Data ....160

Creating the Data Layer....166

Creating the Repository Interface....167

Creating the DataModel....168

Creating the ViewModel....169

Implementing INotifyPropertyChanged....169

Adding the Public Properties....171

Local Data....174

Using JSON to Format Data....174

Local Data Containers....175

Creating the File Repository....175

Creating the View....181

Roaming....187

User-Specified Locations....188

Creating the FileOperations Class....188

Adding the File Association for JSON Files....192

SQLite....195

Summary....203

Chapter 6: Application Lifecycle....204

The Three Application States....205

Running....206

Suspended....206

Terminated....206

State Transitions....207

Launching....208

Activating....208

Suspending....208

Resuming....208

Terminating....208

Killing....209

Managing the Lifecycle....209

Building the Sample App....210

Adding the Navigation Parameter Class....211

Creating the Details Page....212

Creating the Main Page....214

Handling Adding/Editing List Items....216

Responding to App Suspension....217

The OnSuspending Event....217

The EnteredBackground Event....218

Responding to App Activation....223

Determining the Previous Application State....223

Testing the Restoring Navigation State....223

Testing the Restoring Session Information....224

Summary....225

Index....227

Windows 10 Universal Windows Platform (UWP) development with C# and XAML carries a lot of similarities with developing Windows Presentation Foundation (WPF) applications. Well, they both use XAML and C#. Many of your existing skills with user interfaces (UIs) and program code can be leveraged for Windows 10 UWP apps. But there are a lot of differences, as well. The Universal Windows Platform is the major difference between UWP applications and WPF applications. An application written on the UWP can run on whatever hardware implements that functionality, which includes Xbox, Surface, PC, mobile, and even the Hololens. Apps are deployed through a central store (as opposed to click-once deployment or Microsoft Installer packages).


Похожее:

Список отзывов:

Нет отзывов к книге.