Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Dependency Property implement Flyweight Pattern?

Is the dependency property system in WPF the Flyweight Pattern applied to save memory storage?

like image 921
TomCaps Avatar asked Nov 28 '25 13:11

TomCaps


1 Answers

I believe you could consider it as an implementation of the flyweight pattern yes.

Default values are shared across all controls of the same type. Only those properties that deviate from the default values take up extra memory.

Additional information can be found on Christian Mosers blog, or msdn's page on value precedence.

like image 50
Steven Jeuris Avatar answered Nov 30 '25 02:11

Steven Jeuris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!