Viv,
I am looking at this closer in the debugger and I am seeing that the combo box has valid (synchronized) values after the data context is set, but then they get blown away (null) when the ItemsSource is set.
this.InitializeComponent();
this.LayoutRoot.DataContext = this.CATController.GetCATargetByPK(PK);
this.cboActions.ItemsSource = this.ActionsController.GetActionsListBySortOrder();
I'm going to try to reset the selectedvalue bindings in code after the ItemsSource has been loaded and see what that does.
Guy
>HI,
>Hmmm. Bit hard to know what's going on without knowing more about the ItemsSource. What dicatates which item in the list should be selected after loading ?
>
>>I notice also that after having removed the SelectedValue section from the XAML, any changes I make to the select values in the combobox are not saved back to the business object (and database).
>>
>>:(
>>
>>Guy
>>
>>
>>>Hi,
>>>As posted I'd expect that to put some initial value in the ComboBox. Did you remove the
>>>SelectedValue="{Binding Path=Action, Mode=TwoWay}"
>>>?
>>>
>>>>I've tried that. Same results. :(
>>>>
>>>>
>>>>>I'm not very familiar with MM but just maybe:
<ComboBox x:Name="cboActions" DisplayMemberPath="ActionName" SelectedValuePath="ActionCode"
>>>>> IsSynchronizedWithCurrentItem="True"></ComboBox>