How is WPF's DependencyObject implemented? [closed]
Asked Answered
M

1

13

Are there any articles that describe how the DependencyObject class in WPF works "under the hood"?

Specifically, I'm curious about how dependency properties are stored and accessed efficiently.

Mcilwain answered 23/5, 2011 at 21:12 Comment(5)
There's a little bit of detail here in this blog post. That's all I can find though.Spinoff
A good thing to Google is dependency properties sparse storagePlacard
Have a look here as well codeproject.com/Articles/140620/…Lighthouse
Use a decompiler, you'll see the code. If you do not understand everything going on MSDNClarkson
Also a TODO in MonoBartholomeo
D
12

As we know, a dependency property can be defined only on types that subclass DependencyObject. This base class defines a key value dictionary, that contains the local values of dependency properties.

When a dependency property is accessed, it's value is dynamically resolved (via the GetValue(dependencyproperty) in the .Net wrapper). For greater detail, check here: http://wpftutorial.net/DependencyProperties.html

Diallage answered 23/5, 2011 at 21:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.