ZapPanel, FanPanal VirtualizingStackPanel

Views for WPF Forum

Posted 12 years ago by Thomas Weickmans
Version: 11.1.0541
Avatar
Hi,

I'm using version 11.1.0541.

I would like to use a FanPanel or ZapPanel to display a large number of image.
This works, but it's very slow to load. I feel that virtualization does not work.
Does anyone uses it, and if so how?


this is the code I use.
<ListView x:Name="lv" Grid.Row="1"
ItemsSource="{Binding Masks}"

ScrollViewer.IsDeferredScrollingEnabled="True" IsSynchronizedWithCurrentItem="True"
SelectionChanged="lv_SelectionChanged" Loaded="lv_Loaded" PreviewMouseWheel="lv_PreviewMouseWheel" MouseDoubleClick="lv_MouseDoubleClick"
Background="{DynamicResource {x:Static themes:DockingCommonDictionary.DockSiteBackgroundBrushKey}}" >
<ListView.ItemsPanel>
<<ItemsPanelTemplate>
<views:ZapPanel Orientation="Horizontal" VirtualizingStackPanel.IsVirtualizing="True"></views:ZapPanel>
</ItemsPanelTemplate>

</ListView.ItemsPanel>

<ListView.View>
<GridView>
<GridViewColumn Header="Picture">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Width="160" Height="160"
Source="{Binding Path=Path,
Converter={StaticResource myUriToImageConverterResize}}"/>
<TextBlock Grid.Row="1" Text="{Binding Id}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Row="2" Text="{Binding Name}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Row="3" Text="{Binding Manufacturer}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>

</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>

</ListView.View>

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Thomas,

The Views panels do not support virtualization. Setting VirtualizingStackPanel.IsVirtualizing="True" on any panel, including native WPF panels, will have no affect either. That attached property can be set on things like ListBox, whose default Styles will swap in a VirtualizingStackPanel in place of the default StackPanel.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.