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.
- [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, at the bottom…are the lowest priority items,…
- What does content mean in XAML?
- Using dotPeek to show property values for XAML elements
- Expressing content as objects, lists, or dictionaries in XAML vs. code
- Exploring dependency and attached properties
- Working with attached properties in the grid and canvas
- Using custom dependency properties