xaml:
xmlns:be="http://schemas.microsoft.com/xaml/behaviors"
xmlns:prism="http://prismlibrary.com/"
HorizontalAlignment="Left" Style="{StaticResource ComboBoxInPanelStyle}" SelectedIndex="{Binding ImagingModeIndex,Mode=TwoWay}">
viewmodel:
private string _selectedImagingModeForConfig;
public string SelectedImagingModeForConfig
{
get => _selectedImagingModeForConfig;
set => SetProperty(ref _selectedImagingModeForConfig, value);
}
private int _imagingModeIndex = 1;
public int ImagingModeIndex
{
get => _imagingModeIndex;
set => SetProperty(ref _imagingModeIndex, value);
}
private DelegateCommand
private void ExecuteImagingModeChangedCommand(object parameter)
{
string _imagingMode = SelectedImagingModeForConfig;
switch (_imagingMode)
{
case "model1":
break;
case "model2":
break;
case "model3":
break;
case "model4":
break;
case "model5":
break;
}
}