I have a listbox to which I have bound the data context to an object. This object has a number of properties some of which will have a particular attribute.
What I want to do from this is to have the items source set to the properties of the object but to only display those properties that have a particular attribute set.
Can anyone help with where I would start on this?
You could use LINQ and reflection to get the values of the properties which have that attribute set:
Name and DOB are marked as [Att] in my test, and their values are added to the ListBox. SSN is not.