I want you to be able to align the buttons inside the stack panel centrally. The number of buttons is dynamic and is generated when the control is loaded. For example, if 1 button is created, this button should be placed in the center of the control. If 5 buttons are displayed, all 5 should be horizontally aligned one after the other 2, and central to the control.
An alternative approach would be to control the dynamic resizing based on its contents so that it is wider with a lot of buttons and then horizontally aligns the user control on the page, but I'm not sure how to approach any solution?
Does anyone have any ideas?
user1474992
source share