Learn your way! Get started

Windows 8 Using XAML, Part 09: Views, Binding, and Templates

with expert Ken Getz

Watch trailer

Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 2/25/2013
Level Intermediate
Runtime 1h 27m
Closed captioning N/A
Transcript N/A
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included

Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More

Course description

Windows 8 creates a new learning curve for development of applications. This course will help straighten that curve. The course starts with comparing ItemsControl classes: ListView and GridView controls. Then you’ll learn to add items to ItemsControl using markup and programmatically, and use the Items property designer. Next you’ll see how to bind collections of data to an ItemsControl, using List and ObservableCollection, to data from the file system, and to a CollectionViewSource.Next on the list you’ll see how to set the ItemTemplate property to control the item layout, and the ItemsPanelTemplate property to manage the ItemsControl layout. To close out the course you will see how to add a control header, and handle user interaction with the control.


This course assumes that you have some programming background and experience using Visual Studio 2010 and C# or Visual Basic. In addition, the course assumes some basic knowledge of XAML markup and basic knowledge of Windows Store applications and Windows 8.

Learning Paths

This course will help you prepare for the following certification and exam:
MCSD: Windows Store Apps
70-484: Essentials of Developing Windows Store Apps Using C#

This course is part of the following LearnNowOnline SuccessPaths™:
Building Windows Store Applications

Meet the expert

Ken Getz is a featured instructor for several of our Visual Studio courses. He is a Visual Basic and Visual C# expert and has been recognized multiple times as a Microsoft MVP. Ken is a seasoned instructor, successful consultant, and the author or co-author of several best-selling books. He is a frequent speaker at technical conferences like Tech-Ed, VSLive, and DevConnections and he has written for several of the industry's most-respected publications including Visual Studio Magazine, CoDe Magazine, and MSDN Magazine.

Course outline

Views, Binding, and Templates

ListView and GridView (24:01)
  • Introduction (00:38)
  • ListView Control (00:27)
  • GridView Control (00:29)
  • Displaying Data (00:33)
  • Altering Layout (00:43)
  • Demo: Altering Layout (01:50)
  • Add Items to Items Collection (00:45)
  • Data Types (00:46)
  • Controlling Layout of Items (00:18)
  • Handle SelectionChanged Event (00:43)
  • Demo: GridView Selection Event (04:08)
  • Demo: ListView Selection Event (03:31)
  • Setting Item Style (00:31)
  • Setting Item Layout (00:35)
  • Demo: Item Style and Layout (02:06)
  • Create Items Programmatically (00:57)
  • Demo: Create Programmatically (04:23)
  • Summary (00:29)
Data Binding (29:59)
  • Introduction (00:33)
  • Can't Have it Both Ways (00:31)
  • What You Can Bind (00:41)
  • Demo: Simple Binding (02:15)
  • Demo: More Complex Binding (04:01)
  • Bind to ObservableCollection (00:40)
  • Demo: Binding Dynamic Items (04:30)
  • Binding to File System (02:22)
  • Demo: Binding to File System (04:18)
  • Handling Concurrency/Grouping (00:43)
  • CollectionViewSource (00:30)
  • Examine Split App Demo (01:11)
  • Demo: Split App Template (03:52)
  • Demo: How the Split App Snaps (03:07)
  • Summary (00:37)
Templates (33:31)
  • Introduction (00:35)
  • Changing the Look (00:29)
  • Data Template (00:34)
  • Standard Template (01:38)
  • Using Data Template (01:01)
  • Demo: Preparing the Example (04:33)
  • Demo: Data Model (02:17)
  • Demo: Data Template (02:11)
  • Define your own DataTemplate (00:22)
  • Where to Place the Template (00:53)
  • Demo: Custom Data Template (03:11)
  • Specifying the Layout (00:44)
  • Modify ListView Layout (00:32)
  • Demo: Modifying ListView (01:43)
  • Add a Header (00:50)
  • Demo: Adding a Header (01:50)
  • Modifying User Interaction (00:37)
  • Retrieving Selected Items (00:52)
  • Demo: Multiple Selection (04:44)
  • Reacting to Clicks (00:57)
  • Demo: Reacting to Clicks (01:51)
  • Summary (00:59)