Providing a consistent look for an application is important. Use styles to define a set of common properties for a set of controls. The settings are defined once, in the style, then apply to all the elements. This reduces repetitious XAML properties and
- [Instructor] In this tutorial,…I'll look at the weekly calendar.…Remember this is the calendar that shows…each of the tour stops and when they're busy,…and when they're not.…And at the top of this grid are some text blocks.…There's one for each column,…and the issue that I have…is there's a lot of redundant XAML…for each of these labels,…and I'll reduce the amount of XAML I have…and centralize it by using something…called a style.…First let me show you how I added…the weekly calendar to this project.…Over in MainWindow.xaml,…on the TabItem I brought in views,…colon ScheduleView.…
Then in the ScheduleView itself,…I built up the XAML here.…I'll talk about what's in here in a minute,…and in the code behind,…I wrote some code in the loaded event…that adds the hours column and adds the busy block.…This is what's drawing those rectangles on the screen.…If you want to to look at the code it's here.…I'm going to concentrate on the XAML part of this file.…Now let's take a look at this first text block…Oh this is Paddington's Pastries.…
- 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
Visual Studio Team Services: The Basicswith 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.