I have in my XAML a ComboBox that has a binding to a list of components in a view model. Whenever the users clicks an item in the combo box, I want a dialog to pop open for the user to enter a number, click OK, and then close the dialog, saving the number in the viewmodel.
This is the combo box:
<ComboBox ItemsSource="{Binding Components}"
DisplayMemberPath="ComponentName"
SelectedItem="{Binding SelectedComponent}"
Grid.Column="0"></ComboBox>
I am aware this is not possible with a MessageBox, so I am unsure how to accomplish this in WPF. I want to avoid any code behind if possible. I had a look at this tutorial, but I'm unsure how to make this work with a viewmodel. I am using the MVVM pattern in my WPF application.
Where would I place the code for my input box and how would I save a value entered in a property?