From the course: Microsoft XAML: 2 Content and Properties
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Order of precedence for dependency properties
From the course: Microsoft XAML: 2 Content and Properties
Order of precedence for dependency properties
- [Teacher] In this video, I'll look at the order of precedence for dependency properties. Because multiple services might set a dependency property, the dependency system has a strict order of precedence that it uses to determine which service prevails and sets the value. I'm using WPF for this example. The other XAML frameworks work the same, but they have slightly different priority lists. This is what the demonstration looks like. I'll click on this First Demo button. There's three areas to look at in this demo. On the left side of the screen, near the top, is the items that I'm changing. In this example, I'll be working with TextBlocks. And in this screen, I'm setting the FontWeight, which is the dependency property for all three of these. At the bottom of the screen is a screenshot that shows the Subset of Precedence Order. This is the order that WPF resolves the conflicts. This is a subset, meaning I didn't put everything in here. I simplified it somewhat. When you read this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
The trouble with normal .NET properties for UI7m 56s
-
Explore the concept of dependency properties4m 33s
-
Use some dependency properties4m 53s
-
Order of precedence for dependency properties8m 56s
-
Explore the concept of attached properties4m 35s
-
Attached properties with the grid3m
-
Attached properties with the canvas3m 36s
-
Concepts of custom dependency properties3m 10s
-
Register the custom dependency property3m 20s
-
Use the custom dependency properties2m 1s
-
-