para windows app lo que puedes hacer es crear una clase que defina tu valor y texto
ejemplo:
Código:
public class ListItem
{
public ListItem(string value, string text)
{
myValue = value;
myText = text;
}
private string myValue;
public string MyValue
{
get { return myValue; }
set { myValue = value; }
}
private string myText;
public string MyText
{
get { return myText; }
set { myText = value; }
}
}
Y para cargar tu combo:
Código:
comboBox1.DisplayMember = "MyText";
comboBox1.ValueMember = "MyValue";
comboBox1.Items.Add(new ListItem("Valor1", "Texto 1"));
comboBox1.Items.Add(new ListItem("Valor2", "Texto 2"));
comboBox1.Items.Add(new ListItem("Valor3", "Texto 3"));
MessageBox.Show("Texto = " + (comboBox1.Items[0] as ListItem).MyText);
MessageBox.Show("Valor = " + (comboBox1.Items[0] as ListItem).MyValue);
Salu2