Reputation: 583
I generate objects of framework Rectangle class (which is sealed) and programmatically add them to Canvas. I want to add some information to that objects. Is there such a possibility? I can get and set attached properties in XAML but these is not useful for me.
Upvotes: 10
Views: 5640
Reputation: 2037
You can set attached properties in code, something like this:
OwningClass.SetMyAttachedProperty(textBox, true);
Upvotes: 22