RadRichTextBox executing time height

4 posts, 0 answers
  1. JOSE
    JOSE avatar
    7 posts
    Member since:
    Jun 2012

    Posted 22 Jul 2013 Link to this post

    We are using a RadRichTextBox and we want to know the actual height of  the RadDocument you have inside. How  can we get the real height of the document depending on its content?.
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 25 Jul 2013 Link to this post

    Hello JOSE,

    Would you mind sharing why you need to know the actual height of a RadDocument? Currently this is not possible, however we might be able to suggest another approach for what you are trying to achieve.

    I'm looking forward to your reply.

    Regards,
    Petya
    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
  4. JOSE
    JOSE avatar
    7 posts
    Member since:
    Jun 2012

    Posted 05 Aug 2013 Link to this post

    Hello Petya,
     
    Thank you for your fast answer.

    We have a Canvas where the user can add different elements, one of them is the RadRichTextBox, he can write in it all he wants and the scrolls are enabled while doing it. Afterwards, the user can print that document into a RadDocument, to be shown into the PDF Viewer, for that we use the ImageTools libraries to convert the canvas into images that are splitted and added to the RadDocument into all the pages that are necesary. We need the height of the RadDocument inside the RadRichTextBox because we do not want to have the scrolls at that moment, we want to resize it to the actual heigth of its content so all the information can be shown in the final document that is shown using the viewer.

    Hope this explanation exposes our situation.

    Regards.
  5. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 08 Aug 2013 Link to this post

    Hi Jose,

    We are not sure how you have implemented this scenario and if using RadRichTextBox would be the appropriate control to use. 

    When it comes to the height of the document you are interested in  - it is in Flow LayoutMode, is that correct? 
    In that case, you could use the DesiredSize property of the document. Please try this out and let us know if you encounter any issues.


    Regards,
    Iva Toteva
    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 >>
Back to Top