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

Binding in RadRichTextBox

1 Answer 114 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Dariusz
Top achievements
Rank 1
Dariusz asked on 14 Jul 2014, 09:09 AM
I read some threads on it forum on this topic and I produced the following code in  xaml:

 <Grid>           
                                <telerik:XamlDataProvider x:Name="XamlDataProvider" Xaml="{Binding xxx}"
                                    RichTextBox="{Binding ElementName=RadRichTextBox}"/>
                                <telerik:RadRichTextBox x:Name="RadRichTextBox" IsSpellCheckingEnabled="False"/>
                                <!--<TextBlock Text="{Binding xxx}"></TextBlock>-->
                            </Grid>

The xxx is a property in my view model. The data from RadRichTextBox document I convert to xaml and save in database and when I open a window and in database is the xxx I want to display it in RadRichTextBox. Now it's don't work. When I uncomment the line with textblock then in it there is the xaml string so datacontex should be good.

1 Answer, 1 is accepted

Sort by
0
Dariusz
Top achievements
Rank 1
answered on 14 Jul 2014, 09:58 AM
I fixed the problem by that code:

<Grid>           
                                <telerik:RadRichTextBox x:Name="RadRichTextBox" IsSpellCheckingEnabled="False" telerik:XamlDataProvider.Source="{Binding OldDamage}"/>
                            </Grid>
Tags
RichTextBox
Asked by
Dariusz
Top achievements
Rank 1
Answers by
Dariusz
Top achievements
Rank 1
Share this question
or