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
No Data
Reply
  • 85
    posted

    Please let me know if this issue has been resolved and how. I was not able to follow a link in this forum that is supposed to have the answer

Children