I have the folowwing C# code in the .cs file and I want to move it to the XAML. the code includes property called: OperationConverte
Binding binding1 = new Binding("DisplayNames")
{
Source = OperationConverter,
};
ComboBox4.SetBinding(ComboBox.ItemsSourceProperty, binding1);
Binding binding2 = new Binding("Operation")
{
Mode = BindingMode.TwoWay,
Converter = (OperationConverter as IValueConverter)
};
ComboBox4.SetBinding(ComboBox.SelectedValueProperty, binding2);
So what I've done is that:
<ComboBox Name="ComboBox4" MinWidth="100" ItemsSource="{Binding Path=OperationConverter.DisplayNames}"
SelectedValue="{Binding Path=Operation, Mode=TwoWay,
Converter={?????DONT KNOW WHAT TO DO HERE????}}" Margin="30,123,83,148" />
but I don't realize how to connect the OperationConverter