I can't find the right syntax to bind directly the item of my list in xaml.
<Listview ItemsSource={Binding Items}>
<Listview.ItemTemplate>
<CustomUserControl Item={Binding} />
</Listview.ItemTempalte>
</Listview>
this code works fine. But when i want to add a converter to the binding, it displays me a syntax error :
<Listview ItemsSource={Binding Items}>
<Listview.ItemTemplate>
<CustomUserControl Item={Binding ,Converter={StaticResource myConverter}} />
</Listview.ItemTempalte>
</Listview>
Does anyone know the way to do it ?
Thanks!
Ok so the answer was just
{Binding Converter={StaticResource myConverter}}
without the comma..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With