Reputation: 38190
Can I add some kind of custom attributes in XAML ?
Upvotes: 0
Views: 645
Reputation: 17272
Perhaps you mean Attached properties (scroll down for info on how to create a custom one)? For examle "DockPanel.Dock" is an Attached property.
Or maybe Markup extensions? (though that is something a little bit different)
You can also place Attributes on custom controls and read them in code behind - just like any other .NET class, but that is not possible to do from XAML (since those are set per-type/method/..., not per-instance).
Upvotes: 1
Reputation: 32568
You can, using Attatched Properties. This lets you add your own and data to the xaml on any control you choose.
Upvotes: 1