This is my xaml:
<ComboBox Name="comboColors">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Rectangle Fill="{Binding Name}" Width="16" Height="16" Margin="0,2,5,2" />
<TextBlock Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
And here is a population of combobox items in c#:
comboColors.ItemsSource = typeof(Colors).GetProperties();
Now the question is - how to make this combo show its items in drop-down list 4-5-6 or more columns?
And another question - how could I insert a title for this drop down? Say "palett colors are:" This is a text field - not a pair of color- name perhaps I could add transparent color + title as first element but how to make it be i a first row?
May be a datagrid as dropdown is a cool idea? I ll try it now)