次のように、データを ZoomedOut セマンティック ズームにバインドしています。
var result = from title in _allTitles group title by title._titleSubject into grp orderby grp.Key select grp;
groupedTitlesSource.Source = result;
(semanticZoom.ZoomedOutView as ListViewBase).ItemsSource = groupedTitlesSource.View.CollectionGroups;
Group.Key を使用してキーにアクセスしていますが、グループの最初の項目にもアクセスしたいのですが、これを行う最も簡単な方法は何ですか? 私のXamlはZoomedOutViewの下にあります:
<SemanticZoom.ZoomedOutView>
<GridView x:Name="zoomedOutGridView" HorizontalAlignment="Center">
<GridView.ItemTemplate>
<DataTemplate>
<Grid Width="210" Height="140" Background="#CC196CFF">
<TextBlock
Text="{Binding Group.Key}"
FontFamily="Segoe UI Light"
FontSize="24"
Foreground="White"
VerticalAlignment="Top"/>
<!-- Also want to access the first item in the group here -->
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
</SemanticZoom.ZoomedOutView>
どんな助けでも素晴らしいでしょう、そして私はこれに非常に慣れていないので、できるだけ単純です:)ありがとう