使用 SemanticZoom 显示按字母顺序排列的 headers,就像在“开始”菜单上一样

Use SemanticZoom to show alphabetized headers like on the Start Menu

我有 collection 个项目,我想在按字母顺序排列的列表中显示,您可以在其中单击 header 以获得显示带有字母 [= 的 GridView 的缩小视图13=](加上更多)就像在开始菜单上一样。我猜我应该使用 SemanticZoom 但我不确定如何设置它。执行此操作的最佳方法是什么?

是的,您需要在 xaml 中提供放大和缩小视图。 您还需要对数据进行分组并提供 'key'(每个单词的第一个字符),以便 jumplist 可以将其用于概览。

参考样板 xaml:

<SemanticZoom>
     <SemanticZoom.ZoomedInView>
         <!-- Element to display when "zoomed in". Usually a ListView or GridView -->
     </SemanticZoom.ZoomedInView>
     <SemanticZoom.ZoomedOutView>
         <!-- Element for jump list, usually a GrivView or ListView -->
     </SemanticZoom.ZoomedOutView>
 </SemanticZoom>

可在此处找到完整示例:http://visuallylocated.com/post/2014/04/28/Migrating-from-the-LongListSelector-to-the-ListView-in-Windows-Phone-XAML-Apps.aspx