Reputation: 406
I read some threads on telerik forum and here 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 string property in my view model which has xaml string of RadRichTextBox Document. The data from RadRichTextBox document I convert to xaml and save in database and when I open a window 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.
Upvotes: 1
Views: 1404
Reputation: 406
<telerik:RadRichTextBox x:Name="RadRichTextBox" IsSpellCheckingEnabled="False" telerik:XamlDataProvider.Source="{Binding xxx}" />
It fixed my problem
Upvotes: 1