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

Text Dataprovider and FlowLayout

1 Answer 35 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Christian Moravek
Top achievements
Rank 1
Christian Moravek asked on 15 Mar 2011, 10:19 AM
Hi

I am using the Richtextbox with Dataproviders, a ViewModel and Html and text properties on it. If I use the HTML-Dataprovider, the result will be rendered automatically in flow layout and everthing is fine.

If I use a text property on my view model with the Text-Dataprovider, then the rendered result is a paged layout with blue background.

I have also set the the LayoutMode on the RadDocument to "Flow" in my xaml-File. But ist seems, that this will be overridden from the Dataproviders.

Any suggestions to get flow layout with Text values and the Text-Dataprovider. Maybe I am missing something...

btw, if I use the Text Property with the HTML-Dataprovider then the result is also a flow layout, but i am not sure if the formatting will be correct with some text content. That is why I want to use the Text-Dataprovicer.

Edit: I tried the HTML Dataprovider with a larger, formatted (line breaks) Text document and the formatting gets lost.

Regards
Christian

1 Answer, 1 is accepted

Sort by
0
Ivailo Karamanolev
Telerik team
answered on 17 Mar 2011, 10:38 AM
Hi Christian Moravek,

You can use the TxtDataProvider with whichever layout mode you like. All you have to do is attach to the SetupDocument event of the data provider and customize the document (e.g. set the layout mode to flow). You can also change any other document setting this way.
Let us know if you need additional assistance.

Regards,
Ivailo
the Telerik team
Tags
RichTextBox
Asked by
Christian Moravek
Top achievements
Rank 1
Answers by
Ivailo Karamanolev
Telerik team
Share this question
or