Hi, currently i am constructing a DataTemplate for OutlookbarItem as following using a ListView displaying a list of my ViewModel (LHSBrowseItem which contains a list of items i like to display inside a listview)
However, i encounter problems when the listview items size is around 5000:
(1) When i minimize and then maximize the outlookbar, the maximizing takes around 2-3 seconds before the windows shows and become reponsive
(2) Same thing happens when i try to resize the main window, it will "hangs " for 2-3 secs before i can operate the outlook bar
To me, it seems that the inside the outlookbar is redrawing itself whenever there is a change.
[Additional Information]
My style for this outlook bar is as following,
One strange thing i notice is that when outlookbar item with 5k listview items is shown, somehow it also affects another tab control performance, it makes the tab switching quite slow, it pause around 1 sec before the tab switches to other tab and when the outlookbar is minimized, the problem is gone.
your help will be appreciated. Btw, we have purchased your official license. :)
Can u help regarding this?
thanks a lot
<DataTemplate x:Key="dtOutlookBarItem" DataType="LocalViewModel:LHSBrowseItem"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <TextBox Name="tboxTelerik" Visibility="{Binding Path=AllowSearch, Converter={StaticResource converterBoolVisibility}}"> </TextBox> <LocalControls:ucSpinnerSwirl x:Name="lhsProgressBar" Grid.Row="1" HorizontalAlignment="Center" Margin="5" Visibility="{Binding Path=CollectionLoaded, Converter={StaticResource converterBoolVisibilityRvs}}"/> <ListView Name="lstViewTelerik" Grid.Row="1" ItemsSource="{Binding Path=Items}" IsSynchronizedWithCurrentItem="True" Visibility="{Binding Path=CollectionLoaded, Converter={StaticResource converterBoolVisibility}}" SelectionChanged="ListView_SelectionChanged"> <ListView.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel></VirtualizingStackPanel> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.ItemTemplate> <DataTemplate DataType="LocalViewModel:LHSItem"> <TextBlock Text="{Binding Path=Label}"/> </DataTemplate> </ListView.ItemTemplate> </ListView> </Grid> </DataTemplate>However, i encounter problems when the listview items size is around 5000:
(1) When i minimize and then maximize the outlookbar, the maximizing takes around 2-3 seconds before the windows shows and become reponsive
(2) Same thing happens when i try to resize the main window, it will "hangs " for 2-3 secs before i can operate the outlook bar
To me, it seems that the inside the outlookbar is redrawing itself whenever there is a change.
[Additional Information]
My style for this outlook bar is as following,
<DataTemplate x:Key="dtOutlookBarDropdown" > <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="30" /> <ColumnDefinition Width="auto" /> </Grid.ColumnDefinitions> <Image Grid.Column="0" Width="20" HorizontalAlignment="left" Source="{Binding SmallIcon}" /> <Label Grid.Column="1" HorizontalAlignment="Center" Content="{Binding Header}" /> </Grid></DataTemplate><Style TargetType="{x:Type TelerikNavigation:RadOutlookBar}"> <Setter Property="Width" Value="220"/> <Setter Property="IsVerticalResizerVisible" Value="False"/> <Setter Property="ItemDropDownContentTemplate" Value="{StaticResource dtOutlookBarDropdown}"/> </Style> <Style TargetType="{x:Type TelerikNavigation:RadOutlookBarItem}"> <Setter Property="Title" Value="{Binding Header}"/> <Setter Property="Header" Value="{Binding Header}"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="Icon" Value="{Binding LargeIcon}"/> <Setter Property="SmallIcon" Value="{Binding SmallIcon}"/> <Setter Property="ToolTip" Value="{Binding Header}"/> <Setter Property="ContentTemplate" Value="{StaticResource dtOutlookBarItem}"/> </Style>One strange thing i notice is that when outlookbar item with 5k listview items is shown, somehow it also affects another tab control performance, it makes the tab switching quite slow, it pause around 1 sec before the tab switches to other tab and when the outlookbar is minimized, the problem is gone.
your help will be appreciated. Btw, we have purchased your official license. :)
Can u help regarding this?
thanks a lot