我正在使用分组的
ListView
放在 Flyout
中,当弹出框打开时,分组标题会出现奇怪的UI问题。这只发生了一瞬间,但大多数用户仍然能够注意到。
XAML 代码(从完整的重现示例中摘录,http://ge.tt/1DWlXbq1/v/0?c):
<Page.Resources>
<DataTemplate x:Key="GroupHeaderTemplate">
<ContentControl Content="{Binding Key}"
FontWeight="Bold"
FontSize="{ThemeResource TextStyleLargeFontSize}"
Foreground="{ThemeResource PhoneAccentBrush}"
Margin="0 20" />
</DataTemplate>
<CollectionViewSource x:Key="ItemsViewSource"
IsSourceGrouped="True"
Source="{Binding Items}" />
</Page.Resources>
<Page.BottomAppBar>
<CommandBar>
<AppBarButton Icon="Caption">
<AppBarButton.Flyout>
<Flyout>
<ListView ItemsSource="{Binding Source={StaticResource ItemsViewSource}}"
Margin="20 0">
<ListView.GroupStyle>
<GroupStyle HeaderTemplate="{StaticResource GroupHeaderTemplate}" />
</ListView.GroupStyle>
</ListView>
</Flyout>
</AppBarButton.Flyout>
</AppBarButton>
</CommandBar>
</Page.BottomAppBar>
我无法使用内置的ListPickerFlyout
,因为它不支持分组。
我尝试在默认样式中查找ListView
/Flyout
的对应故事板或转换,但未能成功。
我想修复该动画或完全禁用它。任何帮助都将不胜感激。