This is a migrated thread and some comments may be shown as answers.

OutlookbarItem performance issue

1 Answer 87 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Shengwei
Top achievements
Rank 1
Shengwei asked on 25 Sep 2012, 03:46 AM
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)

<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

   

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 27 Sep 2012, 01:25 PM
Hi Shengwei,

I've created a sample project in order to simulate the issue but with no avail. I've commented out two visibility bindings and a custom control inside the OutlookBarItem template. But they should not have a significant performance hit relevant to the number of list view items.
Could you please take a look at my attempt and check if I'm missing something. The best way to assist you would be to modify the attached project in order to introduce issue.

I'm changing the post type to general feedback, so you should be able to attached resources.

Kind regards,
Hristo
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
OutlookBar
Asked by
Shengwei
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or