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

Binding to span

1 Answer 130 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 04 Oct 2011, 11:40 AM
Is it possible to bind to spans? Eg:

<t:RadRichTextBox>
    <t:RadDocument>
        <t:Section>
            <t:Paragraph>
                <t:Span Text="{Binding KeyName}" Cursor="Hand" />
                <t:Span Text="updated to"/>
                <t:Span Text="{Binding DisplayValue}" FontStyle="Italic"/>
            </t:Paragraph>
        </t:Section>
    </t:RadDocument>
</t:RadRichTextBox>

If not, how can I achieve this? I need readonly, databound, formatted text that wraps.

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 05 Oct 2011, 12:54 PM
Hi Jonathan,

You cannot bind the Text of Spans separately. The only way to bind is using DataProviders, which bind the whole content of the document in the rich text box.
You can use the Flow LayoutMode property to ensure text wrapping, whereas editing can be permitted using the IsReadOnly property.
I hope this helps.

Regards,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

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