This is a migrated thread and some comments may be shown as answers.

How to Copy Dynamically added Control from RadRichTextBox ?

1 Answer 93 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sopan
Top achievements
Rank 1
Sopan asked on 26 Jul 2013, 01:17 PM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Iva Toteva
Telerik team
answered on 30 Jul 2013, 08:35 AM
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 >>
Tags
RichTextBox
Asked by
Sopan
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or