【发布时间】:2014-10-15 22:41:24
【问题描述】:
我正在开发一个 Windows Phone 8.1 运行时应用程序,我正在使用 ListView,只有 GroupStyle 及其 HeaderTemplate 集。
一切正常,除了我需要禁用在滚动列表时始终位于顶部的粘性标题,但我找不到需要编辑哪个模板才能完全禁用粘性标题。真正困扰我的一件事是,当我离开页面时,当前页眉消失,并且在同一位置出现空白。
代码很简单:
<CollectionViewSource
x:Key="cvs"
IsSourceGrouped="True"
ItemsPath="GroupItems"
Source="{Binding Categories}">
</CollectionViewSource>
在Resource,
还有ListView:
<ListView
x:Name="ListView"
IsSwipeEnabled="False"
ItemTemplateSelector="{StaticResource AllGamesViewTemplateSelector}"
ItemsSource="{Binding Source={StaticResource cvs}}"
SelectionMode="None"
ShowsScrollingPlaceholders="True">
<ListView.GroupStyle>
<GroupStyle HeaderTemplate="{StaticResource AllGamesViewCategoryTemplate}"/>
</ListView.GroupStyle>
</ListView>
所以我的问题是如何禁用分组 ListView 上的粘性标题?
【问题讨论】:
-
我不认为是 GroupStyle,我认为更可能是 ItemsPanel 或 ItemsPresenter。 ItemsPresenter 的 HeaderTransitions 可能是原因。
-
您找到解决方案了吗?我也遇到了同样的问题
标签: xaml windows-runtime winrt-xaml windows-phone-8.1