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

binding to IEnumerable<RadDocument>

1 Answer 97 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Ingemar asked on 17 Jul 2010, 05:20 PM

I am trying to use a binding in the following code. Using a List<string> in the TextBlock works but using a List<RadDocument> in RadRichTextBox does not. Why is it so  and what should I do?  

        <DataTemplate x:Name="LeftPageTemplate">
            <telerikDocuments:RadRichTextBox Document="{Binding}"/>
            <!--<TextBlock Text="{Binding}"/>-->
        <DataTemplate x:Name="RightPageTemplate"/>                  
        ItemsSource="{Binding ListOfRadDocuments}"
        LeftPageTemplate="{StaticResource LeftPageTemplate}"
        RightPageTemplate="{StaticResource RightPageTemplate}"/>

The general question is: How do I bind the content of a RadRichTextBox in a RadBook to an IEnumerable<RadDocument> itemsource.
Another question is: What is currently the smartest way to present a RadDocument in a RadBook i.e. assuming a RadDocument with page breaks where the different pages in the RadDocument should map to the corresponding pages in a RadBook?

Best regards,

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 20 Jul 2010, 12:43 PM
Hi Ingemar,

Displaying document content in Pages (document paging) is one of the most complex tasks of RadDocument and RadRichTextBox therefore it would be very difficult for you to simulate it to make it work in RadBook. We are currently working on a demo (as I mentioned in the other forum post) that will use different approach and some new custom controls that will present only a single page from a document. I'll let you know when these custom controls and demo are ready.

However binding of the Document property will not work since it is not a dependency property. We will consider changing this in the next version.

All the best,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question