I have a list of tabs where Tab is:
public class Tab
{
public int Id {get; set;}
public string Name {get; set}
public List<country> Country {get; set;}
}
Now I want to bind it to two combo boxes: The first combobox is fine, but on the second I want to display a list of countries.
<custom:ComboBox Title="Tab"
ItemsSource="{Binding Tabs, Mode=TwoWay}"
ValuePath="Id"
Value="{Binding Model.Id, Mode=TwoWay}"
DisplayPath="Name"
IsEnabled="{Binding IsEnabled, Mode=TwoWay}"/>
<custom:ComboBox Title="Country"
SelectedItem="{Binding Model.Country, Mode=TwoWay}"
ItemsSource="{}"
DisplayPath="CountryName"
IsEnabled="{Binding IsEnabled, Mode=TwoWay}"/>
How to set ItemsSource in second combobox when I know Id. Another way than creating a varible, like a selectedList, and then binding to it?
EDIT

I create a new dialog box and I submit the model with the id tab and dialog box. List of tabs.
source
share