Skip to content

Commit 86c8fe7

Browse files
authored
Merge pull request #2562 from jorisvandermeulen/Faster-SelectFromList.xaml
performance: SelectFromList on large list
2 parents 30fc6f1 + 25e5cee commit 86c8fe7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyrevitlib/pyrevit/forms/SelectFromList.xaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</DataTemplate>
5454

5555
<ItemsPanelTemplate x:Key="ItemsPanelTemplate">
56-
<StackPanel />
56+
<VirtualizingStackPanel />
5757
</ItemsPanelTemplate>
5858
</Window.Resources>
5959
<DockPanel Margin="10">
@@ -130,7 +130,10 @@
130130
HorizontalContentAlignment="Stretch"
131131
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
132132
ItemTemplate="{DynamicResource ItemContainerTemplate}"
133-
ItemsPanel="{DynamicResource ItemsPanelTemplate}" />
133+
ItemsPanel="{DynamicResource ItemsPanelTemplate}"
134+
VirtualizingStackPanel.IsVirtualizing="True"
135+
VirtualizingStackPanel.VirtualizationMode="Recycling"
136+
ScrollViewer.CanContentScroll="True"/>
134137
<GridSplitter x:Name="infoSplitter" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ResizeDirection="Columns" Visibility="Collapsed" />
135138
<ScrollViewer x:Name="infoPanel" Grid.Column="2" Visibility="Collapsed">
136139
<TextBlock x:Name="infoData" Margin="10,0,0,0" TextWrapping="Wrap" />

0 commit comments

Comments
 (0)