Dear community,
While I have worked with C# for a number of years now, I must admit that I am new to WPF + Infragistics controls. If you have any insight, I would love to hear your thoughts on the following:
In this particular case, the XamGrid's entire object tree is being serialized/deserialized. As a result, I suspect that my problem is related to:
ADDITIONAL CONTEXT
SAMPLE CODE
[A] Column Binding
<ig:TemplateColumn.ItemTemplate> <DataTemplate> <Image HorizontalAlignment="Center" Width="16" Height="16" Source="{Binding Converter={StaticResource SourceToTargetConverter}}" /> </DataTemplate></ig:TemplateColumn.ItemTemplate>
** SourceToTargetConverter: is not the converter's real name - the converter's name is irrelevant here
[B] Persist Everything
<ig:XamGrid ig:PersistenceManager.PersistenceGroup="{DynamicResource igPG}"
<ig:PersistenceManager.Settings> <ig:PersistenceSettings SavePersistenceOptions="AllButIgnored" > <ig:PersistenceSettings.PropertySettings> <ig:PropertyNamePersistenceInfo PropertyName="FilteringSettings"/> </ig:PersistenceSettings.PropertySettings> </ig:PersistenceSettings> </ig:PersistenceManager.Settings>
[C] Persist Customized Values
<ig:PersistenceManager.Settings> <ig:PersistenceSettings SavePersistenceOptions="OnlySpecified" LoadPersistenceOptions="OnlySpecified"> <ig:PersistenceSettings.PropertySettings> <ig:PropertyNamePersistenceInfo PropertyName="ColumnResizingSettings"/> <ig:PropertyNamePersistenceInfo PropertyName="ColumnMovingSettings"/> <ig:PropertyNamePersistenceInfo PropertyName="SortingSettings"/> <ig:PropertyNamePersistenceInfo PropertyName="ColumnChooserSettings"/> <ig:PropertyNamePersistenceInfo PropertyName="GroupBySettings" Options="Contains"/> </ig:PersistenceSettings.PropertySettings> </ig:PersistenceSettings> </ig:PersistenceManager.Settings>
Sample code is from: XamGrid Persistence Settingshttp://es.infragistics.com/community/forums/t/63366.aspx?PageIndex=1
It appears that the TemplateColumn.ItemTemplate is not being serialized when the XamGrid is persisted using the ig:PersistenceManager. As a result:
TemplateColumn.ItemTemplate
XamGrid
ig:PersistenceManager
IValueConverter
ItemTemplate
ig:TemplateColumn
Key
DataContext
UPDATE 1
Now that I have a better understanding of the what, I can provide an explanation for the why. The following is taken directly from the Infragistics documentation:
"There are some types of properties that are not saved by the Infragistics Control Persistence Framework. It does not save AttachedProperties, DataTemplates, Paths, ControlTemplates, Styles, and ItemPanelTemplates."
[SOURCE: About Infragistics Control Persistence Framework]