Windows 10 Development for Absolute Beginners
Total Page:16
File Type:pdf, Size:1020Kb
Windows 10 Development for Absolute Beginners Based on the video series originally recorded by Bob Tabor, http://www.LearnVisualStudio.NET Edited and revised by Bob Tabor and Steven Nikolic About This PDF contains what I call a “transliteration” of the original video series. After recording each video, I had them transcribed and edited for closed captioning, then took those closed captioning files, stripped out the special formatting, and used them as the basis for the text in this document. I added screenshots, re-wrote copious amounts of text to make it read less like a transcript and more like a book. The result is nearly 400 pages that should suffice as a close representation of what is discussed in each video, cleaned up dramatically. In other words, don’t expect to watch the video AND read this document together at the same time. Some topics are discussed out of order, in less / greater length and detail, etc. It’s provided for those who want don’t watch to wade through 17.5 hours of video to get at the material, or who do not speak English as their primary language. I always underestimate the amount of effort these large projects will require. I usually forget the “double-it-and-add-10” rule when creating estimates. After realizing I was falling way behind schedule and already fatigued physically and mentally, I called in a friend for help. Fortunately, Steven Nikolic, a customer-turned-ally on my website stepped up and took on the editorial tasks for a large number of lessons to help me complete this as quickly as possible. Now we both need to schedule a trip to the chiropractor! If you are enjoying this PDF, please take a moment and thank him via his Twitter handle (@steven_nikolic). Please note that this was prepared hastily and I’m confident it has grammatical mistakes and perhaps, occasionally, technical mistakes. If you are easily offended by mistakes, I’d recommend you purchase a book by a major technical publisher where they utilize the skills of several editors to verify the correctness – grammatically, technically, etc. – of the material. As the old saying goes, “you get what you pay for”. If you find serious mistakes that need to be corrected, please be kind and point that out to me via my email address: [email protected]. I’m offering that email address only for mistakes – I don’t give technical support. Please don’t ask me to help you with your project. I’m sorry … too many requests, too little time. I sincerely hope this work helps you realize your goals. Best wishes and warm regards, Bob Tabor October, 2015 P a g e 2 | 397 Table of Contents About............................................................................................................................................................. 2 Table of Contents .......................................................................................................................................... 3 UWP-001 - Series Introduction ..................................................................................................................... 6 UWP-002 - Creating your First Universal Windows Platform App .............................................................. 10 UWP-003 - Overview of Topics Related to Universal Windows Platform App Development .................... 21 UWP-004 - What Is XAML? ......................................................................................................................... 26 UWP-005 - Understanding Type Converters ............................................................................................... 31 UWP-006 - Understanding Default Properties, Complex Properties and the Property Element Syntax ... 33 UWP-007 - Understanding XAML Schemas and Namespace Declarations ................................................. 41 UWP-008 - XAML Layout with Grids ........................................................................................................... 43 UWP-009 - XAML Layout with StackPanel .................................................................................................. 51 UWP-010 - Cheat Sheet Review: XAML and Layout Controls ..................................................................... 59 UWP-011 - Laudable Layout Challenge ....................................................................................................... 62 UWP-012 - Laudable Layout Challenge: Solution ....................................................................................... 64 UWP-013 - Legendary Layout Challenge ..................................................................................................... 67 UWP-014 - Legendary Layout Challenge: Solution ..................................................................................... 69 UWP-015 - Laborious Layout Challenge...................................................................................................... 71 UWP-016 - Laborious Layout Challenge: Solution ...................................................................................... 73 UWP-017 - XAML Layout with RelativePanel .............................................................................................. 76 UWP-018 - XAML Layout with the SplitView .............................................................................................. 85 UWP-019 - Working with Navigation .......................................................................................................... 90 UWP-020 - Common XAML Controls - Part 1 .............................................................................................. 99 UWP-021 - Implementing a Simple Hamburger Navigation Menu........................................................... 107 UWP-022 - Cheat Sheet Review: Windows 10 Layout Hamburger Navigation and Controls ................... 113 UWP-023 - Hamburger Heaven Challenge ................................................................................................ 117 UWP-024 - Hamburger Heaven Challenge: Solution ................................................................................ 121 UWP-025 - Common XAML Controls - Part 2 ............................................................................................ 128 UWP-026 - Working with the ScrollViewer ............................................................................................... 138 UWP-027 - Canvas and Shapes ................................................................................................................. 141 P a g e 3 | 397 UWP-028 - XAML Styles ............................................................................................................................ 146 UWP-029 - XAML Themes ......................................................................................................................... 152 UWP-030 - Cheat Sheet Review: Controls, ScrollViewer, Canvas, Shapes, Styles, Themes ..................... 165 UWP-031 - Stupendous Styles Challenge .................................................................................................. 170 UWP-032 - Stupendous Styles Challenge Solution - Part 1: MainPage..................................................... 175 UWP-033 - Stupendous Styles Challenge Solution - Part 2: Navigation and DonutPage ......................... 178 UWP-034 - Stupendous Styles Challenge Solution - Part 3: CoffeePage .................................................. 182 UWP-035 - Stupendous Styles Challenge Solution - Part 4: SchedulePage .............................................. 186 UWP-036 - Stupendous Styles Challenge Solution - Part 5: CompletePage ............................................. 187 UWP-037 - Utilizing the VisualStateManager to Create Adaptive Triggers .............................................. 189 UWP-038 - Working with Adaptive Layout ............................................................................................... 196 UWP-039 - Adaptive Layout with Device Specific Views .......................................................................... 201 UWP-040 - Data Binding to the GridView and ListView Controls ............................................................. 203 UWP-041 - Keeping Data Controls Updated with ObservableCollection ................................................. 210 UWP-042 - Utilizing User Controls as Data Templates ............................................................................. 213 UWP-043 - Cheat Sheet Review: Adaptive Layout, Data Binding ............................................................. 218 UWP-044 - Adeptly Adaptive Challenge ................................................................................................... 222 UWP-045 - Adeptly Adaptive Challenge Solution - Part 1: Setup and MainPage Layout ......................... 226 UWP-046 - Adeptly Adaptive Challenge Solution - Part 2: Creating the Data Model and Data Binding .. 230 UWP-047 - Adeptly Adaptive Challenge Solution - Part 3: Creating a User Control as the Data Template .................................................................................................................................................................. 235 UWP-048 - Adeptly Adaptive Challenge Solution - Part 4: Adaptively Resizing ....................................... 237 UWP-049 - UWP SoundBoard – Introduction ........................................................................................... 239 UWP-050 - UWP SoundBoard - Setup and MainPage Layout ..................................................................