I want to create a UserControl in WPF through which I want to expose a collection property. I want to change the UI of the UserControl based on the changes in collection.
For example, lets say I have a collection of strings which is binded to my UserControl. Based on that collection i want to create buttons on the UserControl containing those text as button text. Is there a way I can acieve this?
Yes, you can set a
DataTemplatecontaining a button for anItemsControlcontrol that is binded to that collection. For Example: