Код: Выделить всё
public class ComboBoxTypeItem
{
public string Type { get; set; }
public BitmapSource Icon { get; set; }
public ComboBoxTypeItem(string type)
{
this.Type = type;
switch (type)
{
case PLMC.SPEC_REQ_TYPE:
Icon = new BitmapImage(new Uri("Resources/spec.png", UriKind.Relative));
break;
case PLMC.RAZDEL_REQ_TYPE:
Icon = new BitmapImage(new Uri("Resources/rst.png", UriKind.Relative));
break;
case PLMC.REQ_TYPE:
Icon = new BitmapImage(new Uri("Resources/requirement.png", UriKind.Relative));
break;
case PLMC.REQ_ND_TYPE:
Icon = new BitmapImage(new Uri("Resources/requirementnd.png", UriKind.Relative));
break;
default:
break;
}
}
}
Я пробовал установить привязку через DisplayMemberPath, но это не помогло
Подробнее здесь: https://stackoverflow.com/questions/790 ... f-combobox
Мобильная версия