The PersistenceFramework should be aware if any new UIElements are added to a layout it persists.
Info for the root object needed in PErsistenceError event
PersistenceFramework does not persist property of type byte[] in CustomPropertyProvider scenario. Use List<byte> as a workaround if applicable.
RadRichTextBox (RTB) is used in MainWindow and no other controls are used.
Saving the RTB with PersistenceFramework results in endless loop of saving RTB dialogs and its template parts.
This results in StackoverflowException.
EDIT:
Option 1 for workaround
<
telerik:RadRichTextBox
x:Name
=
"rtb"
>
<
telerik:PersistenceManager.SerializationOptions
>
<
telerik:SerializationMetadataCollection
>
<
telerik:PropertyNameMetadata
Condition
=
"Except"
Expression
=
"Dialog"
SearchType
=
"PropertyName"
/>
</
telerik:SerializationMetadataCollection
>
</
telerik:PersistenceManager.SerializationOptions
>
</
telerik:RadRichTextBox
>
Option 2 for workaround
PersistenceManager manager = new PersistenceManager();
manager.PropertyPersisting += (o, ea)=>
{
if (!string.IsNullOrEmpty(ea.Name))
{
if (ea.Name.Contains("Dialog"))
{
ea.Cancel = true;
}
}
};
IsolatedStorageProvider isoProvider = new IsolatedStorageProvider(manager);
isoProvider.SaveToStorage(PersistenceManager.GetStorageId(this.rtb));
Does not save correctly \r\n entries. When we load the stored date only "\n" is returned and the \r is lost.