Is RadDocument Obsolete now ?
I recently upgraded to silverlight 5 and Telerik contols 2012.2.607.1050 and i now getting errors recognising my RadDocument/Paragraph/Section code
RadDocument document =
this.CreateDocument();
document.LayoutMode = DocumentLayoutMode.Paged;
document.Measure(RadDocument.MAX_DOCUMENT_SIZE);
document.Arrange(
new RectangleF(PointF.Empty, document.DesiredSize));
PdfFormatProvider provider = new PdfFormatProvider();
provider.Export(document, fileStream);
private RadDocument CreateDocument()
{
RadDocument document =
new RadDocument();
this.CreateChartDocumentPart(document);
return document;
}
private void CreateChartDocumentPart(Telerik.Windows.Documents.Fixed.Model.RadFixedDocument document)
{
Section section =
new Section();
Paragraph paragraph =
new Paragraph();
BitmapImage bi = new BitmapImage();
using (MemoryStream ms = new MemoryStream())
{
RadChart1.ExportToImage(ms,
new Telerik.Windows.Media.Imaging.PngBitmapEncoder());
bi.SetSource(ms);
}
ImageInline image =
new ImageInline(new WriteableBitmap(bi)) { Width = 700, Height = 500 };
paragraph.Inlines.Add(image);
section.Blocks.Add(paragraph);
document.Sections.Add(section);
}