I'm have listView which show Name of book and first Author:
<ListView.View>
<GridView>
<GridViewColumn Header="Name" Width="Auto" DisplayMemberBinding="{Binding Name}" />
<GridViewColumn Header="Author" Width="Auto" DisplayMemberBinding="{Binding Authors[0].Name}" />
</GridView>
</ListView.View>
But i need to show not only name first author, but all author in collection separated by commas. This is my Model:
public class Book : IModel
{
public Book()
{
Authors = new List<Author>();
Tags = new List<string>();
}
public string Name { get; set; }
public List<Author> Authors { get; set; }
public string ISBN { get; set; }
public int Pages { get; set; }
public List<string> Tags { get; set; }
public int PublicationYear { get; set; }
public PublicationHouse PublicationHouse { get; set; }
}
And code behind XAML:
public partial class BooksView : ListView
{
public BooksView()
{
InitializeComponent();
ItemsSource = FilesManager.books.Values;
}
}