I've got an instance of an object bound in XAML. It's got a method that will return to me a list of other objects (based on the property value I pass this method, it will return all the objects with that property value).
<ObjectDataProvider ObjectInstance="_this.DataContext" MethodName="GetListByCategory" x:Key="List">
<ObjectDataProvider.MethodParameters>
<System:String>Windows</System:String>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
I (eventually) want to display this list on a tab with some convoluted DataTemplate. But not to get ahead of myself.
I want to get all the objects that should be displayed on a particular TabItem inside a TabControl (ones that have a category matching the TabItem's name or header - this is done in the method). How do I pass my bound method the relevant TabItem's header or name?
Bear in mind that I need to bind to the return value of this bound method to display in a DataTemplate in the TabItem. I don't know if that would necessarily be relevant to the answer of the problem but I want to make sure that I'm clear in defining it.