简体   繁体   中英

Adding custom attributes with unique content

I was looking for a way to add a custom property to a xaml control.

I found this solution: Adding custom attributes to an element in XAML?

Not is my question: How can I permit only unique content (like the name Attribute)?

The behavior of the attached properties is "Allow different child elements to specify unique values for a property that is actually defined in a parent element"

Read " Why Use Attached Properties " section for better understanding. Hence we couldn't maintain the unique value

Ref :: Link to Refer

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