I have a button attached to a command in the view model. This button deletes the rows current selected in the listview so I would like to show a messagebox of confirmation before proceeding. Is user click ok button (in messagebox) then command is executed, otherwise, if user click cancel button command attached is not called. Is it possible? If so how?
<Button Name="btnDelete" Command="{Binding DeleteRowsCommand}"/>
Another possibility is to call the command on click and in the view model through a property that is attached to a custom message box placed in the view, to make this custom messagebox visible when value of the property is true. But then how can I send back to the view model which button 'Ok' or 'Cancel' has been pressed?