Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
Grid slow to display when used with WPF binding and the Office theme
posted

I have a bit of a strange case,

I have a tab control.

And on each tab I have a grid.

Switching between these tabs is very slow.

You also end up with this in output window of visual studio every time you switch tabs:

System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DataPresenterBrushKeys.GroupByAreaBackgroundHighlightKey'; ResourceKey.HashCode='36205315'; ResourceKey.Type='Infragistics.Windows.Themes.StaticPropertyResourceKey'

System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DataPresenterBrushKeys.GroupByAreaBackgroundHighlightKey'; ResourceKey.HashCode='36205315'; ResourceKey.Type='Infragistics.Windows.Themes.StaticPropertyResourceKey'

System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DataPresenterBrushKeys.GroupByAreaBackgroundHighlightKey'; ResourceKey.HashCode='36205315'; ResourceKey.Type='Infragistics.Windows.Themes.StaticPropertyResourceKey'

System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='DataPresenterBrushKeys.GroupByAreaBackgroundHighlightKey'; ResourceKey.HashCode='36205315'; ResourceKey.Type='Infragistics.Windows.Themes.StaticPropertyResourceKey'

If you turn off the office2007 theme these mesages go away and it speeds right up.

Odd?  Quite.

It took me some work to reproduce my problem in a test app but this is what I have found.

If you add XamGrids to the tab control directly, no problems (switching stays fast).  If the grids get added through a Wpf data biding the this problem occurs.

Something like this for example : (Where 'View' ends up being a control with a xamlGrid on it.)

    <Window.Resources>

        <DataTemplate x:Key="ContentTemplate">

            <ContentControl Content="{Binding Path=View}"/>

        </DataTemplate>

    </Window.Resources>

 

    <TabControl Name="BoundTabControl"

        ContentTemplate="{StaticResource ContentTemplate}">        

    </TabControl>

 

Any ideas? or should I be sending this one to support.

 

 

Parents
  • 69686
    posted

    Hello,

    I tried to reproduce this behavior. I was able to some extent but not all of it.

    I really get these warnings in the Output, however, the performance does not change much. Probably I am missing something in the process of recreation.

    If you have a working sample, please attach it here so I can look it in or contact directly developer support here.

    Alex.

Reply Children