0
您好我有下一個XAML標記(只是一塊當然):自定義視圖列表視圖綁定WPF
<Window.Resources>
<GridView x:Key="gridview">
<GridViewColumn Width="200" DisplayMemberBinding="{Binding Title}">
<GridViewColumnHeader Content="Titel" Tag="Title" Click="SortClick"/>
</GridViewColumn>
<GridViewColumn Width="200" DisplayMemberBinding="{Binding Artist}">
<GridViewColumnHeader Content="Artiest" Tag="Artist" Click="SortClick"/>
</GridViewColumn>
<GridViewColumn Width="200" DisplayMemberBinding="{Binding Album}">
<GridViewColumnHeader Content="Album" Tag="Album" Click="SortClick"/>
</GridViewColumn>
<GridViewColumn Width="50" DisplayMemberBinding="{Binding Genre}">
<GridViewColumnHeader Content="Genre" Tag="Genre" Click="SortClick"/>
</GridViewColumn>
<GridViewColumn Width="50" DisplayMemberBinding="{Binding Jaar}">
<GridViewColumnHeader Content="Jaar" Tag="Jaar" Click="SortClick"/>
</GridViewColumn>
</GridView>
<my:IdToImageConverter x:Key="idToImageConverter" />
<DataTemplate x:Key="iconTemplate">
...
</DataTemplate>
<my:PlainView x:Key="iconView"
ItemTemplate="{StaticResource iconTemplate}"
ItemWidth="300"/>
</Window.Resources>
<Grid>
<ListView Name="LibView" ItemsSource="{Binding ElementName=win, Path=Biblio}"/>
</Grid>
文獻記錄是包含用於LibView ICONVIEW和GridView元素的觀察到的集合是:i用於LibView觀點。這工作完美。
現在我想通過「藝術家」添加視圖至極組的每一個元素,我想顯示此類似:
Artist1 - TitleA - AlbumA - TitleB - AlbumB - TitleC - AlbumC Artist2 - TitleD - AlbumD ...
我想我必須做出某種模板,但我不甚至知道這是否可以使用XAML。
THX搜索,我想試試 比亞stollnitz是真棒:d – 2010-11-19 19:29:00