0

I have a problem with optimisation the xamdatagrid. I'm trying use this http://www.infragistics.com/community/blogs/kiril_matev/archive/2010/10/26/optimizing-xamdatagrid-performance.aspx

But when I download styles for the controls I have got the error Object reference not set to an instance of an object.

You can see this on screenshot. enter image description here

or this. Line:336

<Setter Property="TemplateCardView">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type igDP:DataRecordPresenter}">
                <igWindows:CardPanel x:Name="baseGrid" Background="{TemplateBinding Background}">
                    <!-- Record Content -->
                    <Rectangle Fill="{DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, CardBackground}}" />
                    <ContentPresenter x:Name="PART_RecordContentSite" Content="{TemplateBinding DataContext}" ContentTemplate="{TemplateBinding {ComponentResourceKey {x:Type igDP:DataRecordPresenter}, RecordContentAreaTemplate}}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                </igWindows:CardPanel>
            </ControlTemplate>
        </Setter.Value>
    </Setter>

error indicates to <ControlTemplate..>

and if I remove

Fill="{DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, CardBackground}}"

error will not be

Please tell me what is wrong?

Alex
  • 69
  • 4
  • 11
  • Are you using the styles from the sample Kiril provided in the blog post or did you start with the Default Styles for the version of the control that you are currently using which are installed by default? Also do you have an example project that already reproduces the issue? If so, can you post it somewhere? – alhalama Aug 27 '13 at 21:48

1 Answers1

1

Try the following:

<Rectangle Fill="{DynamicResource {ComponentResourceKey
TypeInTargetAssembly={x:Type igDP:XamDataGrid},
ResourceId=CardBackground}}" />

and i think you will have a property for the CardBackground, perhaps you have an error like the guy in the following question: Getting a ComponentResourceKey to Work?

Community
  • 1
  • 1
Tobias
  • 232
  • 1
  • 16