It appears that the TemplateColumn.ItemTemplate
(aka: SeverityColumn) is not being serialized when the XamGrid
is persisted using the ig:PersistenceManager
. As a result:
- When the application starts for the first time, the
TemplateColumn.ItemTemplate
is loaded from BAML and the column is displayed with the appropriate formatting (using the suppliedIValueConverter
).- NOTE: you will be able to see the
ItemTemplate
using Visual Studio's debugger and the Watch window
- NOTE: you will be able to see the
- In the current configuration, the
ig:PersistenceManager
is explicitly setting theTemplateColumn.ItemTemplate
to null when theXamGrid
is being deserialized.- the reason why unformatted data is being displayed in the column is because the XamGrid is automatically falling back to the
ig:TemplateColumn
'sKey
to load data from theDataContext
- the reason why unformatted data is being displayed in the column is because the XamGrid is automatically falling back to the
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."