So I am trying to bind to a list within a ListView item but I can't seem to get the binding correct. If some one could help me with the corrected binding that would be great!
Here is the source you will probably need:
//class that xaml is initially bound to
public partial class UploadMngPanel : Grid
{
....
//initial list to bind to
public ObservableCollection<FinishedAnimeCollection> UploadedAnime
{
get { return uploadedAnime; }
}
}
public class FinishedAnimeCollection
{
...
//second list to bind to
private ObservableCollection<AnimeEpisodeItem> _episodes = new ObservableCollection<AnimeEpisodeItem>();
public ObservableCollection<AnimeEpisodeItem> Episodes
{
get { return _episodes; }
}
}
public class AnimeEpisodeItem
{
public String Title { get; set; }
public DateTime TimeAdded { get; set; }
}
The XAML that I am trying to fix is below
<!-- First list binding here (this works)-->
<ListView Name="finishedView" ItemsSource="{Binding UploadedAnime}">
<ListView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="AnimeExpander.xaml"/>
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="AnimeRow">
<DockPanel>
<!-- <Image Height="75" Width="Auto" Source="{Binding Image}" DockPanel.Dock="Left" VerticalAlignment="Top"/> -->
<Expander Template="{StaticResource AnimeExpanderControlTemplate}" Header="{Binding AnimeTitle}">
<Expander.ContentTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="1,1,1,1">
-->
<ListView.View>
<GridView>
<GridViewColumn Width="700" Header="Anime" CellTemplate="{StaticResource AnimeRow}"/>
</GridView>
</ListView.View>
</ListView>
If you need any more source code please let me know. Thanks alot!