I have a UserControl that is a button, with certain characteristics, and I have a window that has several of these buttons in their \"normal\" style. On this same window, I hav
A better way would be to create a data-object in code that represents the 30 items that you want in your UI, for example:
class DataObject
{
string Tag {get;set;}
string Content {get;set;}
}
(I am sure you can come up with a better name than that!). Then create your 30 items and set them as the ItemsSource of an ItemsControl:
List myObjects = new List();
// populate here
itemsControl.ItemsSource = myObjects
Your ItemsControl has a DataTemplate that is used to render each item: