I am trying to achieve a simple thing, or i think it's simple but i don't know if it's possible...
Imagine the following scenario... In the ViewModel i have one Property called SelectedProduct and other one called NewProduct (both of the same type, the model).
In my MainWindow we have a ListView and two buttons, one is the Add button and the other is the Update button (and this one will update the Selected Item in the ListView), and both will open the same window but will do different things.
I am using Commands in the buttons, so i think i can use one Command if have clicked in the Add button of the MainWindow or use the other Command.
So if we click in the Add button, the controls (TextBoxes and ComboBoxes) in the second window will bind the NewProduct property, and if we click in the Update button the second window will bind the SelectedProduct property.
Is there any way to achieve this?
Thanks in advance