WPF use a template system to define UI for controls and data. When a custom template is available, WPF replaces the default UI with the templated interface. This tutorial shows how to add a define a template for the ListBox data.
- [Instructor] Another power feature of WPF is a template.…The idea behind a template is that you…define an alternate UI in ZAML.…It's like a subset of ZAML, and then you can…apply that template to other parts of UI.…So there are different kinds of templates in WPF.…There's a control template.…The idea here is that you create a control,…and then when you create the control,…you define what's known as the default template,…and that's what shown in the control.…You can then go and define an alternate template,…this would be a control template,…and then you tell WPF to use your template…not the default template, so every time it renders…that control, it'll use this alternate UI.…
I'll show you how to do this…in the last chapter in this course.…The template I'll look at in this video…is called a data template.…Here I'll be applying the template to a date source.…You remember that my list box is bound to a list of T.…There's one row in the list box…for each row inside my data source.…So now what I'll do is I'll define a data template,…
- Why choose Windows Presentation Foundation?
- Exploring the project types
- Creating a WPF project in Visual Studio
- Exploring assemblies and parts
- Using the XAML editor
- Creating the UI, including tabs, details, and controls
- Using data binding
- Adding styles
- Writing interaction code
- Using control templates, 3D parts, and effects
Skill Level Intermediate
Learning Visual Studio Team Serviceswith Jose Miguel Rady Allende1h 17m Intermediate
2. Create a WPF Application
3. Create the UI
4. Examples and Concepts
Next steps1m 37s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.