I want to be able to send my Command
the current ComboBox
value.
This is my ComboBox
<ComboBox ItemsSource="{Binding ConcurrentFilesList}"
SelectedIndex="0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding ConcurrentFilesValueChangedCommand}"
CommandParameter="ComboBox.SelectedValue"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</ComboBox>
This ItemSource
ConcurrentFilesList is List
of numbers.
CanExecute
public bool CanExecute(object parameter)
{
int num = (int)parameter;
return true;
}
But my Parameter
is string
EDIT
My parameter is "ComboBox.SelectedIndex"
and not a number.