From c89ee33c5b6c72fab2aee25f6584b83c776dec03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=98=E9=9F=AC=20=E5=BC=A0?= Date: Sun, 15 Nov 2020 20:39:02 +0800 Subject: [PATCH] Use Virtualizing StackPanel instead of GridView to greatly reduce the loading resources. --- Flow.Launcher/ResultListBox.xaml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 072196605..350ef018e 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -16,6 +16,7 @@ Style="{DynamicResource BaseListboxStyle}" Focusable="False" KeyboardNavigation.DirectionalNavigation="Cycle" SelectionMode="Single" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Standard" + ScrollViewer.IsDeferredScrollingEnabled="True" SelectionChanged="OnSelectionChanged" IsSynchronizedWithCurrentItem="True" PreviewMouseDown="ListBox_PreviewMouseDown"> @@ -29,26 +30,20 @@ - - + + - - - - - - + - + - + @@ -60,7 +55,7 @@ - + @@ -81,7 +76,7 @@ - +