Add ImageInline to RadDocument element?

2 posts, 0 answers
  1. Lindsay Miles
    Lindsay Miles avatar
    72 posts
    Member since:
    Dec 2009

    Posted 10 Nov 2013 Link to this post

    Hello,

    I'm having some trouble adding an image to a RadDocument and am obviously doing something wrong.
    ImageInline teamLogo = new ImageInline( isoDir.OpenFile("TeamLogo.png", FileMode.Open));
    Paragraph teamlogoParagraph = new Paragraph();
    teamlogoParagraph.Inlines.Add(teamLogo);
    teamLogoCell.Children.Add(teamlogoParagraph);

    When I get to this:

    popupWindow.radRichTextBox.Document.UpdateLayout() //error on this line
    popupWindow.Show();

    I get this error: Unable to cast object of type 'Telerik.Windows.Documents.Model.ImageInline' to type 'Telerik.Windows.Documents.Model.Block'.

    Any advice on this? Hierarchy is correct and I followed samples in the documentation...

    I HAVE TO use the ImageInline as later on I get an ImageInline object derived from the contents of a canvas control which needs to also go into the RadDocument as an image. I assume solving the former case will help later with the latter...

    Please advise!

    Thanks

     

     

     

     

  2. Svetoslav
    Admin
    Svetoslav avatar
    55 posts

    Posted 13 Nov 2013 Link to this post

    Hello Lindsay,

    Thank you for contacting us!

    We have not experienced such an issue and my attempts to replicate the issue you describe were not successful.
    The best way to approach such a problem is to replicate this behavior on our side and analyze its roots. For this reason I kindly ask you to send us your solution. In order to attach files other than images you'd have to open a support ticket. Once we are able to reproduce the error, we will do our best to assist you.

    Looking forward to hearing from you.

    Regards,
    Svetoslav
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top