简体   繁体   中英

Attached properties to avoid custom controls

I've heard about the possibility to use attached properties to avoid writing a custom control in WPF.
Could you explain me how or address me to a tutorial?
Thank you

I found by myself the answer to my question: attached behaviors. They are a way to extend the functionality of a control without writing a new one and are based on a specific use of attached properties.
I found two interesting articles and I attach them below for those of you who are interested in:
Elad's WPF Blog
Josh Smith's article

I definitely think that the answer you found yourself is valid but for additional info explaining the Attached property pattern (In plain English as I wasn't too thrilled with Josh Smith's Article). Took 5 min to read this and it cleared things up for me quite a bit. Gave me the quick and dirty of it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM