I'm trying to set the converter parameter to a property of an item inside an ItemTemplate.
Since ConverterParameter is not a dependency property Binding doesn't work.
But I don't really need a binding, just setting it once would be enough since it never changes.
<ItemsControl ItemsSource="ItemsWithTypeProperty">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton IsChecked="{Binding SelectedItem.Base.Type, Converter={l:IsEqualConverter}, Mode=TwoWay, ConverterParameter={Type}}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
IsEqualConverter:
Convert: compares the value to the parameter and returns the result
ConvertBack: If the value is true it returns the parameter
The DataContext of the ItemTemplate is a class which contains the Property with the name "Type".
Its type is object.
Is there a way to replace {Type} with something that would just set it to (DataContext.)Type once? If yes how?