How to Copy Dynamically added Control from RadRichTextBox ?

2 posts, 1 answers
  1. Sopan
    Sopan avatar
    34 posts
    Member since:
    May 2012

    Posted 26 Jul 2013 Link to this post


    Hi

    I have dynamically added a control on RadRIchTextBox and also added some content as Text. I want , When I press Ctrl+A and Ctrl+C then i allow to copy all text with added control and allow to paste all Copied data.

    If this is possible then how can I differentiate in copy command Which is Text or Control.

    Thanks & Regards

    Sopan Vaidya

  2. Answer
    Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 30 Jul 2013 Link to this post

    Hi Sopan,

    InlineUIContainers are not copyable document elements. This is so because the content of the UI Element may be set in many different ways (through data-binding, using an ItemsSource, etc.) and RadDocument cannot always clone the inner element.

    One sample implementation of copyable IninleUIContainers can be found in
    this forum thread. Note however that we are not attempting to clone the UIElement in CopyPropertiesFromOverride method - this means that this container will work in Cut-Paste scenario, but will fail with an exception that the element is already added to the visual tree in Copy-Paste scenario.

    After consideration, we have decided to make the default implementation not-copyable. You can try to alter the custom implementation to make if fit your needs. 


    Regards,
    Iva Toteva
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    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. UI for WPF is Visual Studio 2017 Ready
Back to Top