How can i bind ranking RankingInfo1 and rankinginfo 2 to the listbox. basically i am having trouble with the three level hierarchy. RankingInfo1 -> RankingInfo -> Ranking.
public class BookInfo
{
private long _BookId = 0;
public long BookId
{
get
{
return _BookId;
}
set
{
_BookId = value;
}
}
private string _BookTitle = string.Empty;
public string BookTitle
{
get
{
return _BookTitle;
}
set
{
_BookTitle = value;
}
}
public List<RankInfo> RankingInfo1 { get; set; }
public List<RankInfo> RankingInfo2 { get; set; }
}
public class RankInfo {
public int? Ranking { get; set; }
public DateTime? WeekDate { get ; set ;}
}
what i have tried but the thing is that i am getting : booklocator.Model.RankInfo as the output.
<ListBox x:Name="lstrankingUSAToday" ItemsSource="{Binding RankingInfo1}" Grid.ColumnSpan="2">
<StackPanel Width="Auto">
<TextBlock Text="Ranked USA Today: "/>
<TextBlock Text="{Binding Ranking}"></TextBlock>
</StackPanel>
</ListBox>