I\'ve a data template for ListBoxItem which contains of few buttons, and few custom controls like Grid or Chart. Each button is bound to an appropriate command handler, Sel
Can you not set the item as the selected item in the bound command? If your list Item viewmodel has access to whatever the ListBoxes viewmodel is, you should be able to set the property that you have bound there.
Private Sub ButtonClickExecute()
ListBoxVM.SelectedItem = Me.MyModelItem
End Sub
I have done this on occasion and it has worked quite well, so long as the SelectedItem bound property is read/write, PropertyChangeNotification is working.
If your ViewModel and Model don't support this, let me know and we can try another way.
Whoops, did not immediately notice the C# tag. That should be:
ListBoxVM.selectedItem = this.myModelItem;