Skip to content

Commit

Permalink
Merge pull request #304 from punker76/master
Browse files Browse the repository at this point in the history
add style for virtualised ListBox
  • Loading branch information
VikingCode committed Jan 14, 2013
2 parents d7d99d0 + e164080 commit ebd5791
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion MahApps.Metro/Styles/Controls.ListBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@
</Setter.Value>
</Setter>
</Style>


<Style x:Key="VirtualisedListBox"
TargetType="ListBox"
BasedOn="{StaticResource {x:Type ListBox}}">
<Setter Property="VirtualizingStackPanel.IsVirtualizing"
Value="True" />
<Setter Property="VirtualizingStackPanel.VirtualizationMode"
Value="Recycling" />
<Setter Property="ScrollViewer.CanContentScroll"
Value="True" />
</Style>

<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="MinHeight" Value="25" />
<Setter Property="Margin" Value="0" />
Expand Down

0 comments on commit ebd5791

Please sign in to comment.