Binding to an entire data item in XAML

I am using XAML data binding for a ListBox whose ItemSource set to a TypeA object list. One user interface element in an ItemTemplate for a ListBox bound to the TypeA property as follows:

 Source="{Binding PropertyName, Converter={StaticResource customConverter}}" 

Now, instead of binding to a specific property, I want the user interface element to be attached to the entire TypeA instance, so that the user converter can calculate the value from several properties. The question is, what obligatory expression can I use to achieve this?

+6
data-binding silverlight xaml
source share
2 answers

Youn contains no way for this: -

  Source="{Binding Converter={StaticResource customConverter}} 
+6
source share

Have you tried this:

 Source="{Binding ., Converter={StaticResource customConverter}}" 
+6
source share

All Articles