You could set the button's Tag property to the object it's associated with.
button.Tag = collection[index];
When the button is clicked, inspect the
Tag
property to perform some operation on the object.
EDIT=================================
If it were me, I wouldn't use a series of
TextBlock
controls with buttons associated with them. I'd use a some sort of collection container, such as a
ListBox
,
ListView
, or
ComboBox
, with a single button that processes the currently selected item in the container.