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

Copy and Paste doesn't include AnnotationMarkers?

1 Answer 80 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anselmo
Top achievements
Rank 1
Anselmo asked on 30 Aug 2012, 06:13 AM
Hi Iva,

I tried to highlight/select a section which has an annotationmarker (I've created a custom one named SectionAnnotationStart and SectionAnnotationEnd) and clicked Copy. And I then Paste it to the end of the document, but it doesnt include the annotations as part of the pasted section.

I've implemented your code suggestion from this thread  in my SectionAnnotationStart class, but still cant get the AnnotationMarkers from "ClipboardEx.GetDocument();". Am I missing something here?

BTW - this is how I'm intercepting the PasteCommand under CommandExecuting event

      
void xRadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
        {
 
            if (e.Command is PasteCommand)
            {
                DocumentFragment fragment = ClipboardEx.GetDocument();
                if (fragment != null)
                {
                    (sender as RadRichTextBox).InsertFragment(fragment);

                    e.Cancel = true;
                }
            }

        }


Thanks,
Selmo 

1 Answer, 1 is accepted

Sort by
0
Accepted
Iva Toteva
Telerik team
answered on 03 Sep 2012, 07:10 AM
Hello Selmo,

Please find the answer to your question in this forum thread. It is the same for both Silverlight and WPF.

Regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Anselmo
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or