OK
First
Create a public ListItem property and Bind it to TextBox
public ListItem SelectedItem
{
get=>selectedItem;
set
{
selectedItem=value;
RaisePropertyChange();
}
}
<TextBox Text = "{Binding SelectedItem, UpdateSourceTrigger=PropertyChanged}"/>
Second use RelayCommand which accepts command parameter like
RelayCommand<object> AddtyreCommand=> -----new RelayCommand(Addtyres)
where
private void AddTyres(object item)
{
SelectedItem = item as ListItem;
.......
}
Third set Name to combobox and In Button Define CommandParameter
<Button .... CommandParameter="{Binding ElementName=comboTyreList, Path=SelectedItem" />
Thats it. You are done.
Sorry for inappropriate formatting and code.