Well the problem is, that you have bound the Dictionary<int, string>
, which don't have a mechanism to notify the view about the changes. The view cannot be aware, that it has to update.
So I guess, if you would change your XAML like this, it's probably going to work, if you change your SetMonitorsList()
afterwards. It should modify the content of Monitors
.
<ComboBox Grid.Column="1" ItemsSource="{Binding Stations}" DisplayMemberPath="Value"
SelectedValuePath="Key" SelectedValue="{Binding Path=StationTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Monitors}"
DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding Path=MonitorTarget, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>