I have a linkbutton inside a listbox that receives a list of objects. I'm using the ListBox.ItemTemplate and DataTemplate to lay out the listbox items. Can I bind the entire object that is currently binding to the command parameter of the linkbutton? I've tried using
CommandParameter={Binding Data}
and
CommandParameter={Binding DataItem}
but I always get the error in output that 'Data' or 'DataItem' is not a property on said object. Is this even possible?
Try this
CommandParameter = {Binding}
It will bind to the current object which used to generate the item
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With