<Grid x:Name="LayoutRoot"> <ComboBox x:Name="com_ColorItems" Height="41" Margin="198,114,264,0" VerticalAlignment="Top" FontSize="13.333" FontWeight="Bold" Foreground="#FF3F7E24"/> </Grid>
With the code above, I colored all the elements in the green combo box.
private void Window_Loaded(object sender, RoutedEventArgs e) { for (int i = 0; i < 5; i++) { com_ColorItems.Items.Add(i); } }
With the code above, I populated five elements in a combobox. Now I like to dynamically change the color of the 3rd element (3) to "red" in the code. How can i do this?
ASHOK A
source share