Hello, could anyone help me to set combobox or combobox edit values from a datatable? In WinForms it was something like this:
DataSet dataBases = GetDatabases();
if ((dataBases != null) && (dataBases.Tables[0].Rows.Count > 0))
{
comboBoxDataBases.DisplayMember = "DbName";
comboBoxDataBases.DataSource = dataBases.Tables[0];
if (comboBoxDataBases.FindStringExact(tempDBName) > 0)
{
comboBoxDataBases.SelectedIndex = comboBoxDataBases.FindStringExact(tempDBName);
}
}
else
{
comboBoxDataBases.DataSource = null;
}
How do I can do the same functionality with WPF?Could anyone post some simple example.Thanks in advance.