This question is locked. New answers and comments are not allowed.
I would like to do some server-side manipulation of RadDocuments created in Silverlight (remove header and footer specifically). I have a standard .net assembly referencing the Telerik.Windows.Documents assemblies from the WPF Q3. I get an exception on Export. Am I doing something wrong - or is this simply unsupported? This same code works fine in SL.
_message "The type initializer for 'Telerik.Windows.Documents.Layout.RadTextMeasurerSL' threw an exception."
+ _innerException {"The calling thread must be STA, because many UI components require this."} System.Exception {System.InvalidOperationException}
var docs = EntityManager.FindEntities(EntityState.Added | EntityState.Modified).OfType<Document>(); docs.ForEach( d => { var provider = new XamlFormatProvider(); var radDocument = provider.Import(d.Content); radDocument.Sections.First.Headers.Default = new Header(); radDocument.Sections.First.Footers.Default = new Footer(); d.Content = provider.Export(radDocument); });
_message "The type initializer for 'Telerik.Windows.Documents.Layout.RadTextMeasurerSL' threw an exception."
+ _innerException {"The calling thread must be STA, because many UI components require this."} System.Exception {System.InvalidOperationException}