我有一个优化xamdatagrid的问题。我正在尝试使用这个http://www.infragistics.com/community/blogs/kiril_matev/archive/2010/10/26/optimizing-xamdatagrid-performance.aspx
但是当我下载控件的样式时,我得到了错误的object reference not set to a instance of a Object。
你可以在截图上看到这一点。

或者这个。线路: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>向<ControlTemplate..>指示的错误
如果我移除
Fill="{DynamicResource {ComponentResourceKey {x:Type igDP:XamDataGrid}, CardBackground}}"错误将不会
请告诉我出了什么问题?
发布于 2013-08-23 17:14:00
尝试以下操作:
<Rectangle Fill="{DynamicResource {ComponentResourceKey
TypeInTargetAssembly={x:Type igDP:XamDataGrid},
ResourceId=CardBackground}}" />我认为你会有一个CardBackground的属性,也许你有一个错误,就像下面这个问题中的那个人:Getting a ComponentResourceKey to Work?
https://stackoverflow.com/questions/18398613
复制相似问题