About the Author |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Acknowledgments |
|
xxi | |
Introduction |
|
xxiii | |
|
Chapter 1 Introduction to Uno Platform |
|
|
1 | (6) |
|
Who Is This Book For? All Developers |
|
|
2 | (2) |
|
.NET MAUI and Xamarin.Forms Developers |
|
|
2 | (1) |
|
Universal Windows Platform (UWP) and WinUI Developers |
|
|
2 | (1) |
|
Windows Presentation Framework (WPF) Developers |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (2) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
Xamarin Is Not Xamarin.Forms |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (46) |
|
|
7 | (2) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
9 | (4) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (2) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
13 | (38) |
|
|
17 | (1) |
|
Shared Code: UnoDrive.Shared |
|
|
18 | (1) |
|
Windows Target: UnoDrive.Windows |
|
|
19 | (1) |
|
WebAssembly: UnoDrive.Wasm |
|
|
20 | (3) |
|
|
23 | (12) |
|
WPF Target: UnoDrive.Skia.Wpf |
|
|
35 | (3) |
|
GTK Target: UnoDrive.Skia.Gtk |
|
|
38 | (13) |
|
|
51 | (2) |
|
Chapter 3 Your First Page |
|
|
53 | (24) |
|
|
53 | (16) |
|
|
56 | (7) |
|
Customize Layout and Controls |
|
|
63 | (6) |
|
|
69 | (6) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
74 | (1) |
|
|
75 | (1) |
|
|
75 | (2) |
|
Chapter 4 Application Styles |
|
|
77 | (20) |
|
|
77 | (5) |
|
|
78 | (2) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (1) |
|
|
82 | (3) |
|
|
85 | (2) |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
87 | (8) |
|
|
88 | (3) |
|
|
91 | (2) |
|
|
93 | (1) |
|
|
93 | (2) |
|
|
95 | (2) |
|
Chapter 5 Platform-Specific Code and XAML |
|
|
97 | (24) |
|
|
98 | (1) |
|
|
98 | (1) |
|
|
98 | (1) |
|
|
99 | (14) |
|
|
108 | (5) |
|
|
113 | (1) |
|
|
113 | (5) |
|
|
118 | (1) |
|
|
118 | (1) |
|
|
119 | (2) |
|
Chapter 6 Master-Detail Menu and Dashboard |
|
|
121 | (50) |
|
|
121 | (3) |
|
Frame-Based Navigation (View Stack) |
|
|
121 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
123 | (1) |
|
Create a Dashboard Layout |
|
|
124 | (19) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
126 | (1) |
|
|
127 | (8) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
136 | (2) |
|
|
138 | (3) |
|
|
141 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
|
143 | (3) |
|
|
146 | (24) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
152 | (3) |
|
|
155 | (3) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
160 | (3) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
166 | (2) |
|
|
168 | (1) |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
170 | (1) |
|
|
171 | (20) |
|
|
171 | (1) |
|
|
172 | (3) |
|
Update the Header Control |
|
|
174 | (1) |
|
Add Font Files to Projects |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (2) |
|
|
178 | (4) |
|
|
179 | (1) |
|
|
180 | (2) |
|
|
182 | (3) |
|
|
185 | (3) |
|
|
188 | (2) |
|
|
190 | (1) |
|
Chapter 8 Model-View-ViewModel (MVVM) |
|
|
191 | (16) |
|
|
191 | (2) |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
193 | (2) |
|
|
195 | (10) |
|
|
195 | (9) |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (1) |
|
Chapter 9 Dependency Injection and Logging |
|
|
207 | (32) |
|
What Is Dependency Injection? |
|
|
207 | (5) |
|
|
208 | (1) |
|
|
209 | (3) |
|
Dependency Injection in UnoDrive |
|
|
212 | (6) |
|
Add Logging to Dependency Injection |
|
|
218 | (19) |
|
|
223 | (1) |
|
|
223 | (3) |
|
|
226 | (2) |
|
|
228 | (2) |
|
|
230 | (2) |
|
|
232 | (5) |
|
|
237 | (2) |
|
Chapter 10 Application Navigation |
|
|
239 | (20) |
|
Navigation in Uno Platform |
|
|
240 | (3) |
|
|
241 | (1) |
|
Navigation Page Overrides |
|
|
242 | (1) |
|
|
242 | (1) |
|
Add Navigation to LoginViewModel |
|
|
243 | (5) |
|
Add NuGet Packages to Target Platforms |
|
|
244 | (2) |
|
Add Commanding to LoginViewModel |
|
|
246 | (1) |
|
|
247 | (1) |
|
|
248 | (10) |
|
Create INavigationService and Implementation |
|
|
248 | (4) |
|
Register INavigationService with Dependency Injection |
|
|
252 | (1) |
|
Add INavigationService to LoginViewModel |
|
|
252 | (2) |
|
Add INavigationService to the Dashboard |
|
|
254 | (3) |
|
|
257 | (1) |
|
|
258 | (1) |
|
Chapter 11 Authentication with Azure Active Directory |
|
|
259 | (64) |
|
|
259 | (3) |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
261 | (1) |
|
|
261 | (1) |
|
|
262 | (6) |
|
|
268 | (45) |
|
|
269 | (1) |
|
Configuration and Dependency Injection |
|
|
270 | (13) |
|
|
283 | (21) |
|
|
304 | (9) |
|
|
313 | (8) |
|
|
313 | (2) |
|
|
315 | (1) |
|
|
315 | (1) |
|
|
316 | (1) |
|
|
317 | (1) |
|
|
318 | (2) |
|
|
320 | (1) |
|
|
321 | (2) |
|
|
323 | (14) |
|
|
324 | (1) |
|
|
325 | (7) |
|
Is Empty To Visibility Converter |
|
|
325 | (4) |
|
Bool To Visibility Converter |
|
|
329 | (3) |
|
Add Converters to Global Styles |
|
|
332 | (3) |
|
|
335 | (1) |
|
|
336 | (1) |
|
Chapter 13 Microsoft Graph, Web APIs, and MyFilesPage |
|
|
337 | (64) |
|
|
337 | (1) |
|
Web APIs and Uno Platform |
|
|
338 | (1) |
|
Graph Service Implementation |
|
|
338 | (23) |
|
|
338 | (1) |
|
|
339 | (2) |
|
.NET 6 Mobile Data Models |
|
|
341 | (4) |
|
GraphFileService Interface |
|
|
345 | (1) |
|
|
346 | (1) |
|
GraphFileService: AuthenticationProvider |
|
|
347 | (2) |
|
GraphFileService: GetFilesAsync |
|
|
349 | (9) |
|
GraphFileService: GetRootFilesAsync |
|
|
358 | (3) |
|
Dependency Injection Setup |
|
|
361 | (1) |
|
|
361 | (17) |
|
|
362 | (2) |
|
Properties and Data Binding |
|
|
364 | (5) |
|
|
369 | (3) |
|
ViewModel Entry Point and Unitialize |
|
|
372 | (3) |
|
|
375 | (3) |
|
User Interface Implementation |
|
|
378 | (13) |
|
|
379 | (6) |
|
Files and Folders Explorer |
|
|
385 | (4) |
|
MyFilesPage.xaml Complete Code |
|
|
389 | (2) |
|
|
391 | (9) |
|
|
392 | (1) |
|
|
393 | (1) |
|
|
394 | (1) |
|
|
395 | (2) |
|
|
397 | (1) |
|
|
398 | (1) |
|
|
399 | (1) |
|
|
400 | (1) |
|
Chapter 14 Microsoft Graph and Dashboard Menu |
|
|
401 | (18) |
|
|
401 | (10) |
|
Implement the Constructor |
|
|
402 | (1) |
|
|
402 | (2) |
|
Microsoft Graph Integration |
|
|
404 | (3) |
|
Initialize Implementation |
|
|
407 | (2) |
|
Complete DashboardViewModel Implementation |
|
|
409 | (2) |
|
|
411 | (1) |
|
|
412 | (6) |
|
|
412 | (1) |
|
|
413 | (1) |
|
|
414 | (1) |
|
|
415 | (1) |
|
|
416 | (1) |
|
|
417 | (1) |
|
|
418 | (1) |
|
|
418 | (1) |
|
Chapter 15 Images and GridView |
|
|
419 | (16) |
|
|
419 | (2) |
|
|
421 | (2) |
|
|
423 | (4) |
|
|
424 | (3) |
|
|
427 | (7) |
|
|
428 | (1) |
|
|
429 | (1) |
|
|
430 | (1) |
|
|
431 | (1) |
|
|
432 | (1) |
|
|
433 | (1) |
|
|
434 | (1) |
|
|
434 | (1) |
|
|
435 | (8) |
|
|
435 | (2) |
|
|
437 | (5) |
|
|
437 | (2) |
|
|
439 | (3) |
|
|
442 | (1) |
|
Chapter 17 OneDrive Navigation |
|
|
443 | (10) |
|
|
443 | (1) |
|
|
444 | (3) |
|
Forward and Back Navigation |
|
|
447 | (4) |
|
Testing the User Interface |
|
|
451 | (1) |
|
|
452 | (1) |
|
Chapter 18 Offline Data Access |
|
|
453 | (48) |
|
Offline Data Access Strategies |
|
|
453 | (3) |
|
|
455 | (1) |
|
Local Data Store and LiteDB |
|
|
456 | (4) |
|
Add the LiteDB NuGet Package |
|
|
457 | (1) |
|
|
457 | (3) |
|
Authentication and Token Caching |
|
|
460 | (9) |
|
Simple Caching in the Dashboard |
|
|
469 | (7) |
|
Add APIs to the DataStore |
|
|
469 | (4) |
|
Add Offline Code to the Dashboard |
|
|
473 | (3) |
|
GraphFileService and MyFilesPage Caching |
|
|
476 | (24) |
|
|
476 | (8) |
|
Add Offline Code to GraphFileService |
|
|
484 | (10) |
|
Update Loading Indicators |
|
|
494 | (6) |
|
|
500 | (1) |
|
|
501 | (32) |
|
Update the GraphFileService and Data Model |
|
|
501 | (9) |
|
|
510 | (16) |
|
Port Existing Code into BaseFilesViewModel |
|
|
511 | (9) |
|
|
520 | (4) |
|
Implement RecentFilesViewModel |
|
|
524 | (1) |
|
Implement SharedFilesViewModel |
|
|
525 | (1) |
|
Update the User Interface |
|
|
526 | (5) |
|
|
531 | (2) |
Index |
|
533 | |