Skip to content

Commit fda1346

Browse files
committed
enhance: supports virtualization in sub context menu
1 parent 1d7b77e commit fda1346

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Resources/Styles.axaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@
772772
<Popup Name="PART_Popup"
773773
WindowManagerAddShadowHint="False"
774774
Placement="RightEdgeAlignedTop"
775+
MaxHeight="400"
775776
IsLightDismissEnabled="False"
776777
HorizontalOffset="-4"
777778
VerticalOffset="-4"
@@ -793,7 +794,13 @@
793794
<ItemsPresenter Name="PART_ItemsPresenter"
794795
ItemsPanel="{TemplateBinding ItemsPanel}"
795796
Margin="{DynamicResource MenuFlyoutScrollerMargin}"
796-
Grid.IsSharedSizeScope="True" />
797+
Grid.IsSharedSizeScope="True">
798+
<ItemsPresenter.ItemsPanel>
799+
<ItemsPanelTemplate>
800+
<VirtualizingStackPanel Orientation="Vertical"/>
801+
</ItemsPanelTemplate>
802+
</ItemsPresenter.ItemsPanel>
803+
</ItemsPresenter>
797804
</ScrollViewer>
798805
</Border>
799806
</Grid>

0 commit comments

Comments
 (0)