Hello,
I'm using a XamComboEditor binded to a collection, but when I move the current item of the associated view the selected item of the combo editor is not updated.
If I use a "standard" ComboBox this is working fine (with IsSynchronizedWithCurrentItem="true"). So how can I have the same behaviour with my XamComboEditor control ?
Thanks
Thanks for your answer.
The first scenario doesn't seem to work for me (it's possible that I've done something wrong).
It's ok with the second scenario.
The XamComboEditor uses a ComboBox internally. It exposes a ComboBoxStyle property, which you can use to set the IsSynchronizedWithCurrentItem property.
<igEditors:XamComboEditor.ComboBoxStyle>
<Style TargetType="{x:Type ComboBox}">
<Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>
</Style>
</igEditors:XamComboEditor.ComboBoxStyle>
This will work if you are using the XamComboEditor to change the CurrentItem of the Collection view.
Unfortunately, the XamComboEditor will not reflect any changes to the current item if you set it from somewhere else (another element bound to the view). For this, you can handle the CurrentItemChanged event of the collection view and set the SelectedItem property of the XamComboEditor to the CurrentItem of the view.
xamComboEditor1.SelectedItem = view.CurrentItem;
This way, the XamComboEditor will reflect changes to the current item in both scenarios.