Hi,

I have a color enum, with each color an RGB value assigned to it.
Code:
        public enum t_eColors
        {
            White = 0xffffff,
            Black = 0x000000,
            Dark_grey = 0xa0a0a0,
            Red = 0xff0000
         }

            String[] names = Enum.GetNames(typeof(t_eColors));
            Int32[] values = (Int32[])Enum.GetValues(typeof(t_eColors));
The aim is to build a listview with 3 colums i.e.
Column 1: shows the color
Column 2: shows the color name
Column 3: shows the color value


Code:
                <ListView Name ="_listViewColors">
                    <ListView.View>
                        <GridView>                            
                            <GridViewColumn Header="Color" Width="64"/>                            
                            <GridViewColumn Header="Name" Width="Auto" />
                            <GridViewColumn Header="Value" Width="Auto" />
                        </GridView>
                    </ListView.View>
                </ListView>
Now my problem is how to display those by controlling individual cells in listview. Approximately, this is what I need (source VisualStudio):
Name:  colorList.PNG
Views: 291
Size:  8.6 KB

Now I have 2 problems:
1. How to fill the listView? When I do
Code:
_listViewColors.Items.Add(new String{"", names[i], values[i]});
, all I get is first column of my list filled with String[] Array. Second and third colums are empty.
2. How to fill background color of column 1 depending upon the value in colum 3. I know I can get a color by using Color.FromRgb(..)

I do not wish to use binding because my enum will never change during runtime.

Please suggest some solution.

Thanks
Ricky