Binding in RadRichTextBox

2 posts, 0 answers
  1. Dariusz
    Dariusz avatar
    2 posts
    Member since:
    Jun 2014

    Posted 14 Jul 2014 Link to this post

    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.
  2. Dariusz
    Dariusz avatar
    2 posts
    Member since:
    Jun 2014

    Posted 14 Jul 2014 in reply to Dariusz Link to this post

    I fixed the problem by that code:

    <Grid>           
                                    <telerik:RadRichTextBox x:Name="RadRichTextBox" IsSpellCheckingEnabled="False" telerik:XamlDataProvider.Source="{Binding OldDamage}"/>
                                </Grid>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top