so here it is:
Bowls = new ObservableCollection<Bowl>();
SowCommand = new DelegateCommand(param => SowGame(param));
private void SowGame(Object param)
{
Int32 index = Convert.ToInt32(param);
Bowls[index] = ...
}
So i pass "param" to SowGame by pressing a button Command="{Binding SowCommand}"
param is now an object of Bowl type
in SowGame i want to do something with this Bowl object and i know a certain object from a collection can be reached by using Bowls[index of object]. But converting the object to int as above doesn't seem to work.
How can i get the index of the passed object?