enhance: supports virtualization in sub context menu

This commit is contained in:
leo 2024-07-07 09:56:22 +08:00
parent 1d7b77e45f
commit fda13468c4

View file

@ -772,6 +772,7 @@
<Popup Name="PART_Popup" <Popup Name="PART_Popup"
WindowManagerAddShadowHint="False" WindowManagerAddShadowHint="False"
Placement="RightEdgeAlignedTop" Placement="RightEdgeAlignedTop"
MaxHeight="400"
IsLightDismissEnabled="False" IsLightDismissEnabled="False"
HorizontalOffset="-4" HorizontalOffset="-4"
VerticalOffset="-4" VerticalOffset="-4"
@ -793,7 +794,13 @@
<ItemsPresenter Name="PART_ItemsPresenter" <ItemsPresenter Name="PART_ItemsPresenter"
ItemsPanel="{TemplateBinding ItemsPanel}" ItemsPanel="{TemplateBinding ItemsPanel}"
Margin="{DynamicResource MenuFlyoutScrollerMargin}" Margin="{DynamicResource MenuFlyoutScrollerMargin}"
Grid.IsSharedSizeScope="True" /> Grid.IsSharedSizeScope="True">
<ItemsPresenter.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsPresenter.ItemsPanel>
</ItemsPresenter>
</ScrollViewer> </ScrollViewer>
</Border> </Border>
</Grid> </Grid>