Guest User

Guest User

  • Tech Writer
  • 47
  • 90.3k

How to Compare the ComboBox Items with UIElement Names !!!! Please Help

Sep 24 2010 2:53 AM

Hi All.

I just started to study on C# and I have an Application on WPF which reads datas in my XML. I read the datas with Dataset and I put them in to a ComboBox. But i have some shapes (Elipse) and I want to fill that shapes different colors if there the data which i want in ComboBox.

--<Codes>--
DataSet
ds = new DataSet();
ds.ReadXml("D:\\data.xml");
foreach (DataTable tbl in ds.Tables)
{
foreach (DataRow dr in tbl.Rows)
{
cmb1.Items.Add(dr[0].ToString());
}
}
After adding items to ComboBox. For Example I want to fill Elipse1 with Red Color If There is Elipse1 item in ComboBox which comes from XML.
Is there anyone to help me :( ??
Thanks.
 


Answers (3)