I have a ListView and I would like to display multiple collections of same type (contrary to all other topics I found about multiple binding), or even better - an unediable item, something like "default item", as first item in ListView and multiple concatenated collections of same type. For example for one collection and one item:
<ListView ItemsSource="{Binding People}">
<ListView.ItemTemplate>
<DataTemplate>
<WrapPanel>
<TextBlock Text="{Binding Name}" />
</WrapPanel>
</DataTemplate>
</ListView.ItemTemplate>
<ListViewItem ItemsSource="{Binding PatientZero}">
<WrapPanel>
<TextBlock Text="{Binding Name}" />
</WrapPanel>
</ListViewItem>
</ListView>
and
public class Person
{
public string Name { get; set; }
public Person(){}
}
...and code
ObservableCollection<Person> _people =
new ObservableCollection<Person>();
public ObservableCollection<Person> People
{ get { return _people; } }
Person PatientZero { get { return _patientZero ; } }
Person _patientZero = new Person { Name="Unknown"}
obviously, this wont work as it wont get past xaml parser (not mentioning some syntax, but this is an example). Ofcourse I could regulary concat all collections and check if edited item isnt the first one, but I am curious if this can be solved.
Any ideas who to achieve that?