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
I guessed that ColinE's response was off the top of his head, and I gave him a +1 for pointing me in the right direction [THANKS], although it didn't exactly work. What I ended up with was close:
In the constructor for the window, to set up the 30 almost-identical lines:
var numberButtons = Enumerable.Range( 1, 30 )
.Select( r => new KeyValuePair( r.ToString( ), r.ToString( ) ) )
.ToList( );
numberButtonItems.ItemsSource = numberButtons;
Then, this xaml (note that "Caption" is a property of our user control, so it won't work for you):