Binding button properties while generating buttons.