Hi,
We are trying to save a RadDocument into the XAML format.
So, we have add a test button to our UI in order to manage the save.
Unfornutaly, we've got the following exception during the call of the export method :
- ex {System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
à Telerik.Windows.Documents.Model.RadDocument.get_LineSpacing()
--- Fin de la trace de la pile d'exception interne ---
à System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
à System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
à System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
à Telerik.Windows.Documents.FormatProviders.Xaml.XamlWriter.WriteProperties(Object obj)
à Telerik.Windows.Documents.FormatProviders.Xaml.XamlFormatProvider.WriteXaml(Boolean isStylesheet, Object objectToWrite, XamlWriter xamlWriter, Boolean isRoot)
à Telerik.Windows.Documents.FormatProviders.Xaml.XamlFormatProvider.Export(RadDocument document)
à Telerik.Windows.Documents.FormatProviders.Xaml.XamlFormatProvider.Export(RadDocument document, Stream output)
à Arcan.Windows.MainPage.GetXamlFormDocument(RadDocument document)
à Arcan.Windows.MainPage.RadSave(Object sender, RoutedEventArgs e)} System.Reflection.TargetInvocationException
The save method is implemented as follow :
The implementation of the GetXamlFromDocument method is as follow :
Thanks ins advance for any help.
Best regards
Guillaume Chomat