Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DataModel:
- class Reseller
- {
- public Dictionary<int, Car> Cars;
- ...
- }
- class Car
- {
- public string Model { get; set; }
- public string Year { get; set; }
- ...
- }
- <!--Template1 contains a Dictionary<string, Reseller>-->
- <!-- Reseller has another dictionary of Cars like Dictionary<int, Car>-->
- <DataTemplate x:Key="Template1">
- <StackPanel Orientation="Horizontal">
- <GroupBox Header="{Binding Key}">
- <ListView x:Name="Internal_Template2
- ItemTemplate="{StaticResource Template2}"/>
- </GroupBox>
- </StackPanel>
- </DataTemplate>
- <DataTemplate x:Key="Template2">
- <Grid>
- <TextBlock Text="{Binding Template1.Value.Cars.Model}"/>
- <TextBlock Text="{Binding Template1.Value.Cars.Year}"/>
- </Grid>
- </DataTemplate>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement