グループ化されたデータソースでは、HeaderTemplate は GroupStyle.ContainerStyle の下に配置され、コンテナーはヘッダー用とアイテム用の 2 つの行で構成されます。
これは、GridView.HeaderTemplate には当てはまらないようです。ヘッダーは、次のように項目の左側に表示されます。
ヘッダーテキスト [項目 1]
代わりに、項目リストの上にヘッダー テキストを移動する方法はありますか? アクセスできないように見えるGridViewテンプレート自体を変更する必要があると思います。
GridView の XAML は次のとおりです。それは非常に簡単です:
<GridView x:Name="gridItems" ItemContainerStyle="{StaticResource GridViewListContainerStyle}" ItemsSource="{Binding Items}" SelectionMode="None" AllowDrop="True" CanDragItems="True" VerticalAlignment="Top" HorizontalAlignment="Center" CanReorderItems="True" Padding="1">
<GridView.HeaderTemplate>
<DataTemplate>
<Grid>
<TextBox Text="{Binding Title}" Width="290" MaxLength="20"/>
</Grid>
</DataTemplate>
</GridView.HeaderTemplate>
<GridView.ItemTemplate>
<DataTemplate>
<local:MyControl DataContext="{Binding}"/>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
ありがとう。